servo: Add proper values for prototype depth and ID to JIT info.
authorJosh Matthews <josh@joshmatthews.net>
Thu, 14 Feb 2013 13:51:53 -0500
changeset 380017 d2e252094f84cd70d76cacc55285152a3ea20788
parent 380016 3573452532ac88e9e0207f0d4abbd2ea88314926
child 380018 ea3c8051ad439f21279e249afeea1501d5247e76
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
servo: Add proper values for prototype depth and ID to JIT info. Source-Repo: https://github.com/servo/servo Source-Revision: 236f47b0a91057a131441f236b7a57b205116d5a
servo/src/servo/dom/bindings/codegen/CodegenRust.py
--- a/servo/src/servo/dom/bindings/codegen/CodegenRust.py
+++ b/servo/src/servo/dom/bindings/codegen/CodegenRust.py
@@ -1733,18 +1733,18 @@ class CGMemberJITInfo(CGThing):
     def __init__(self, descriptor, member):
         self.member = member
         self.descriptor = descriptor
 
     def declare(self):
         return ""
 
     def defineJitInfo(self, infoName, opName, infallible):
-        protoID = 0 # "prototypes::id::%s" % self.descriptor.name
-        depth = 0 # "PrototypeTraits<%s>::Depth" % protoID
+        protoID =  "prototypes::id::%s as uint" % self.descriptor.name
+        depth = self.descriptor.interface.inheritanceDepth()
         failstr = "true" if infallible else "false"
         return ("\n"
                 "const %s: JSJitInfo = JSJitInfo {\n"
                 "  op: %s,\n"
                 "  protoID: %s,\n"
                 "  depth: %s,\n"
                 "  isInfallible: %s,  /* False in setters. */\n"
                 "  isConstant: false  /* Only relevant for getters. */\n"