<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[151548] branches/dfgFourthTier/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/151548">151548</a></dd>
<dt>Author</dt> <dd>ggaren@apple.com</dd>
<dt>Date</dt> <dd>2013-06-13 08:29:50 -0700 (Thu, 13 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>The Math object should not be polymorphic
https://bugs.webkit.org/show_bug.cgi?id=117576

Reviewed by Oliver Hunt.

Fill in the Math object eagerly, to avoid its structure changing during
execution. There are lots of ways to skin this cat; this one seemed
easiest, and justified given the relative hotness of math operations.

20% speedup on DSP-filtrr tests, small speedups on a few Kraken tests.

* DerivedSources.make:
* JavaScriptCore.order:
* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::jsonTable): Removed the Math object's static table.

* runtime/JSObject.cpp:
(JSC::JSObject::putDirectNativeFunctionWithoutTransition):
* runtime/JSObject.h:
* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
* runtime/MathObject.h:
(JSC::MathObject::create): Set up the Math object at construction time.

* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h: Removed the Math object's static table.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreChangeLog">branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreDerivedSourcesmake">branches/dfgFourthTier/Source/JavaScriptCore/DerivedSources.make</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreJavaScriptCoreorder">branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.order</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCorecreate_hash_table">branches/dfgFourthTier/Source/JavaScriptCore/create_hash_table</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreinterpreterCallFrameh">branches/dfgFourthTier/Source/JavaScriptCore/interpreter/CallFrame.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeJSObjectcpp">branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeJSObjecth">branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeMathObjectcpp">branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeMathObjecth">branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.h</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeVMcpp">branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#branchesdfgFourthTierSourceJavaScriptCoreruntimeVMh">branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesdfgFourthTierSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/ChangeLog        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2013-06-12  Geoffrey Garen  &lt;ggaren@apple.com&gt;
+
+        The Math object should not be polymorphic
+        https://bugs.webkit.org/show_bug.cgi?id=117576
+
+        Reviewed by Oliver Hunt.
+
+        Fill in the Math object eagerly, to avoid its structure changing during
+        execution. There are lots of ways to skin this cat; this one seemed
+        easiest, and justified given the relative hotness of math operations.
+
+        20% speedup on DSP-filtrr tests, small speedups on a few Kraken tests.
+
+        * DerivedSources.make:
+        * JavaScriptCore.order:
+        * create_hash_table:
+        * interpreter/CallFrame.h:
+        (JSC::ExecState::jsonTable): Removed the Math object's static table.
+
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::putDirectNativeFunctionWithoutTransition):
+        * runtime/JSObject.h:
+        * runtime/MathObject.cpp:
+        (JSC::MathObject::finishCreation):
+        * runtime/MathObject.h:
+        (JSC::MathObject::create): Set up the Math object at construction time.
+
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        (JSC::VM::~VM):
+        * runtime/VM.h: Removed the Math object's static table.
+
</ins><span class="cx"> 2013-06-11  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolled back in http://trac.webkit.org/changeset/151362.
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/DerivedSources.make (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/DerivedSources.make        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/DerivedSources.make        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx">     JSGlobalObject.lut.h \
</span><span class="cx">     KeywordLookup.h \
</span><span class="cx">     Lexer.lut.h \
</span><del>-    MathObject.lut.h \
</del><span class="cx">     NamePrototype.lut.h \
</span><span class="cx">     NumberConstructor.lut.h \
</span><span class="cx">     NumberPrototype.lut.h \
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreJavaScriptCoreorder"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.order (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.order        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/JavaScriptCore.order        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -1973,7 +1973,6 @@
</span><span class="cx"> __ZN3JSC3JIT29emit_op_throw_reference_errorEPNS_11InstructionE
</span><span class="cx"> _cti_op_throw_reference_error
</span><span class="cx"> __ZN3JSC16parseIntOverflowEPKcii
</span><del>-__ZN3JSC9ExecState9mathTableEPS0_
</del><span class="cx"> __ZN3JSCL17mathProtoFuncACosEPNS_9ExecStateE
</span><span class="cx"> __ZN3JSCL17mathProtoFuncASinEPNS_9ExecStateE
</span><span class="cx"> __ZN3JSCL17mathProtoFuncATanEPNS_9ExecStateE
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCorecreate_hash_table"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/create_hash_table (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/create_hash_table        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/create_hash_table        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -272,18 +272,6 @@
</span><span class="cx"> 
</span><span class="cx">         my $intrinsic = &quot;NoIntrinsic&quot;;
</span><span class="cx">         $intrinsic = &quot;FromCharCodeIntrinsic&quot; if ($key eq &quot;fromCharCode&quot;);
</span><del>-        if ($name eq &quot;mathTable&quot;) {
-            $intrinsic = &quot;MinIntrinsic&quot; if ($key eq &quot;min&quot;);
-            $intrinsic = &quot;MaxIntrinsic&quot; if ($key eq &quot;max&quot;);
-            $intrinsic = &quot;SqrtIntrinsic&quot; if ($key eq &quot;sqrt&quot;);
-            $intrinsic = &quot;PowIntrinsic&quot; if ($key eq &quot;pow&quot;);
-            $intrinsic = &quot;AbsIntrinsic&quot; if ($key eq &quot;abs&quot;);
-            $intrinsic = &quot;FloorIntrinsic&quot; if ($key eq &quot;floor&quot;);
-            $intrinsic = &quot;CeilIntrinsic&quot; if ($key eq &quot;ceil&quot;);
-            $intrinsic = &quot;RoundIntrinsic&quot; if ($key eq &quot;round&quot;);
-            $intrinsic = &quot;ExpIntrinsic&quot; if ($key eq &quot;exp&quot;);
-            $intrinsic = &quot;LogIntrinsic&quot; if ($key eq &quot;log&quot;);
-        }
</del><span class="cx">         if ($name eq &quot;arrayPrototypeTable&quot;) {
</span><span class="cx">             $intrinsic = &quot;ArrayPushIntrinsic&quot; if ($key eq &quot;push&quot;);
</span><span class="cx">             $intrinsic = &quot;ArrayPopIntrinsic&quot; if ($key eq &quot;pop&quot;);
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreinterpreterCallFrameh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/interpreter/CallFrame.h (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/interpreter/CallFrame.h        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/interpreter/CallFrame.h        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -91,7 +91,6 @@
</span><span class="cx">         static const HashTable* errorPrototypeTable(CallFrame* callFrame) { return callFrame-&gt;vm().errorPrototypeTable; }
</span><span class="cx">         static const HashTable* globalObjectTable(CallFrame* callFrame) { return callFrame-&gt;vm().globalObjectTable; }
</span><span class="cx">         static const HashTable* jsonTable(CallFrame* callFrame) { return callFrame-&gt;vm().jsonTable; }
</span><del>-        static const HashTable* mathTable(CallFrame* callFrame) { return callFrame-&gt;vm().mathTable; }
</del><span class="cx">         static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame-&gt;vm().numberConstructorTable; }
</span><span class="cx">         static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame-&gt;vm().numberPrototypeTable; }
</span><span class="cx">         static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame-&gt;vm().objectConstructorTable; }
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.cpp (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.cpp        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.cpp        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -2189,11 +2189,19 @@
</span><span class="cx">     StringImpl* name = propertyName.publicName();
</span><span class="cx">     ASSERT(name);
</span><span class="cx">     
</span><del>-    JSFunction* function =
-        JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
</del><ins>+    JSFunction* function = JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
</ins><span class="cx">     putDirect(exec-&gt;vm(), propertyName, function, attributes);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void JSObject::putDirectNativeFunctionWithoutTransition(ExecState* exec, JSGlobalObject* globalObject, const PropertyName&amp; propertyName, unsigned functionLength, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
+{
+    StringImpl* name = propertyName.publicName();
+    ASSERT(name);
+    
+    JSFunction* function = JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
+    putDirectWithoutTransition(exec-&gt;vm(), propertyName, function, attributes);
+}
+
</ins><span class="cx"> ALWAYS_INLINE unsigned JSObject::getNewVectorLength(unsigned currentVectorLength, unsigned currentLength, unsigned desiredLength)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(desiredLength &lt;= MAX_STORAGE_VECTOR_LENGTH);
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.h (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.h        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/JSObject.h        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -563,6 +563,7 @@
</span><span class="cx">     void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)-&gt;setUndefined(); }
</span><span class="cx"> 
</span><span class="cx">     void putDirectNativeFunction(ExecState*, JSGlobalObject*, const PropertyName&amp;, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
</span><ins>+    void putDirectNativeFunctionWithoutTransition(ExecState*, JSGlobalObject*, const PropertyName&amp;, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
</ins><span class="cx"> 
</span><span class="cx">     JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&amp;, bool shouldThrow);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeMathObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.cpp (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.cpp        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.cpp        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2007, 2008 Apple Inc. All Rights Reserved.
</del><ins>+ *  Copyright (C) 2007, 2008, 2013 Apple Inc. All Rights Reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -55,35 +55,10 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#include &quot;MathObject.lut.h&quot;
-
</del><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-const ClassInfo MathObject::s_info = { &quot;Math&quot;, &amp;Base::s_info, 0, ExecState::mathTable, CREATE_METHOD_TABLE(MathObject) };
</del><ins>+const ClassInfo MathObject::s_info = { &quot;Math&quot;, &amp;Base::s_info, 0, 0, CREATE_METHOD_TABLE(MathObject) };
</ins><span class="cx"> 
</span><del>-/* Source for MathObject.lut.h
-@begin mathTable
-  abs           mathProtoFuncAbs               DontEnum|Function 1
-  acos          mathProtoFuncACos              DontEnum|Function 1
-  asin          mathProtoFuncASin              DontEnum|Function 1
-  atan          mathProtoFuncATan              DontEnum|Function 1
-  atan2         mathProtoFuncATan2             DontEnum|Function 2
-  ceil          mathProtoFuncCeil              DontEnum|Function 1
-  cos           mathProtoFuncCos               DontEnum|Function 1
-  exp           mathProtoFuncExp               DontEnum|Function 1
-  floor         mathProtoFuncFloor             DontEnum|Function 1
-  log           mathProtoFuncLog               DontEnum|Function 1
-  max           mathProtoFuncMax               DontEnum|Function 2
-  min           mathProtoFuncMin               DontEnum|Function 2
-  pow           mathProtoFuncPow               DontEnum|Function 2
-  random        mathProtoFuncRandom            DontEnum|Function 0 
-  round         mathProtoFuncRound             DontEnum|Function 1
-  sin           mathProtoFuncSin               DontEnum|Function 1
-  sqrt          mathProtoFuncSqrt              DontEnum|Function 1
-  tan           mathProtoFuncTan               DontEnum|Function 1
-@end
-*/
-
</del><span class="cx"> MathObject::MathObject(JSGlobalObject* globalObject, Structure* structure)
</span><span class="cx">     : JSNonFinalObject(globalObject-&gt;vm(), structure)
</span><span class="cx"> {
</span><span class="lines">@@ -98,22 +73,31 @@
</span><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;LN2&quot;), jsNumber(log(2.0)), DontDelete | DontEnum | ReadOnly);
</span><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;LN10&quot;), jsNumber(log(10.0)), DontDelete | DontEnum | ReadOnly);
</span><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;LOG2E&quot;), jsNumber(1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly);
</span><del>-    putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;LOG10E&quot;), jsNumber(0.4342944819032518), DontDelete | DontEnum | ReadOnly); // See ECMA-262 15.8.1.5
</del><ins>+    putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;LOG10E&quot;), jsNumber(0.4342944819032518), DontDelete | DontEnum | ReadOnly);
</ins><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;PI&quot;), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly);
</span><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;SQRT1_2&quot;), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
</span><span class="cx">     putDirectWithoutTransition(exec-&gt;vm(), Identifier(exec, &quot;SQRT2&quot;), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
</span><del>-}
</del><span class="cx"> 
</span><del>-bool MathObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot &amp;slot)
-{
-    return getStaticFunctionSlot&lt;JSObject&gt;(exec, ExecState::mathTable(exec), jsCast&lt;MathObject*&gt;(cell), propertyName, slot);
</del><ins>+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;abs&quot;), 1, mathProtoFuncAbs, AbsIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;acos&quot;), 1, mathProtoFuncACos, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;asin&quot;), 1, mathProtoFuncASin, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;atan&quot;), 1, mathProtoFuncATan, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;atan2&quot;), 2, mathProtoFuncATan2, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;ceil&quot;), 1, mathProtoFuncCeil, CeilIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;cos&quot;), 1, mathProtoFuncCos, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;exp&quot;), 1, mathProtoFuncExp, ExpIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;floor&quot;), 1, mathProtoFuncFloor, FloorIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;log&quot;), 1, mathProtoFuncLog, LogIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;max&quot;), 2, mathProtoFuncMax, MaxIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;min&quot;), 2, mathProtoFuncMin, MinIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;pow&quot;), 2, mathProtoFuncPow, PowIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;random&quot;), 0, mathProtoFuncRandom, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;round&quot;), 1, mathProtoFuncRound, RoundIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;sin&quot;), 1, mathProtoFuncSin, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;sqrt&quot;), 1, mathProtoFuncSqrt, SqrtIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(exec, globalObject, Identifier(exec, &quot;tan&quot;), 1, mathProtoFuncTan, NoIntrinsic, DontEnum | Function);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MathObject::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor&amp; descriptor)
-{
-    return getStaticFunctionDescriptor&lt;JSObject&gt;(exec, ExecState::mathTable(exec), jsCast&lt;MathObject*&gt;(object), propertyName, descriptor);
-}
-
</del><span class="cx"> // ------------------------------ Functions --------------------------------
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL mathProtoFuncAbs(ExecState* exec)
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeMathObjecth"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.h (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.h        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/MathObject.h        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -38,8 +38,6 @@
</span><span class="cx">             object-&gt;finishCreation(exec, globalObject);
</span><span class="cx">             return object;
</span><span class="cx">         }
</span><del>-        static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&amp;);
-        static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&amp;);
</del><span class="cx"> 
</span><span class="cx">         static const ClassInfo s_info;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.cpp (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.cpp        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.cpp        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -90,7 +90,6 @@
</span><span class="cx"> extern const HashTable dateConstructorTable;
</span><span class="cx"> extern const HashTable errorPrototypeTable;
</span><span class="cx"> extern const HashTable globalObjectTable;
</span><del>-extern const HashTable mathTable;
</del><span class="cx"> extern const HashTable numberConstructorTable;
</span><span class="cx"> extern const HashTable numberPrototypeTable;
</span><span class="cx"> JS_EXPORTDATA extern const HashTable objectConstructorTable;
</span><span class="lines">@@ -150,7 +149,6 @@
</span><span class="cx">     , errorPrototypeTable(fastNew&lt;HashTable&gt;(JSC::errorPrototypeTable))
</span><span class="cx">     , globalObjectTable(fastNew&lt;HashTable&gt;(JSC::globalObjectTable))
</span><span class="cx">     , jsonTable(fastNew&lt;HashTable&gt;(JSC::jsonTable))
</span><del>-    , mathTable(fastNew&lt;HashTable&gt;(JSC::mathTable))
</del><span class="cx">     , numberConstructorTable(fastNew&lt;HashTable&gt;(JSC::numberConstructorTable))
</span><span class="cx">     , numberPrototypeTable(fastNew&lt;HashTable&gt;(JSC::numberPrototypeTable))
</span><span class="cx">     , objectConstructorTable(fastNew&lt;HashTable&gt;(JSC::objectConstructorTable))
</span><span class="lines">@@ -284,7 +282,6 @@
</span><span class="cx">     errorPrototypeTable-&gt;deleteTable();
</span><span class="cx">     globalObjectTable-&gt;deleteTable();
</span><span class="cx">     jsonTable-&gt;deleteTable();
</span><del>-    mathTable-&gt;deleteTable();
</del><span class="cx">     numberConstructorTable-&gt;deleteTable();
</span><span class="cx">     numberPrototypeTable-&gt;deleteTable();
</span><span class="cx">     objectConstructorTable-&gt;deleteTable();
</span><span class="lines">@@ -302,7 +299,6 @@
</span><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(errorPrototypeTable));
</span><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(globalObjectTable));
</span><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(jsonTable));
</span><del>-    fastDelete(const_cast&lt;HashTable*&gt;(mathTable));
</del><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(numberConstructorTable));
</span><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(numberPrototypeTable));
</span><span class="cx">     fastDelete(const_cast&lt;HashTable*&gt;(objectConstructorTable));
</span></span></pre></div>
<a id="branchesdfgFourthTierSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.h (151547 => 151548)</h4>
<pre class="diff"><span>
<span class="info">--- branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.h        2013-06-13 15:05:14 UTC (rev 151547)
+++ branches/dfgFourthTier/Source/JavaScriptCore/runtime/VM.h        2013-06-13 15:29:50 UTC (rev 151548)
</span><span class="lines">@@ -226,7 +226,6 @@
</span><span class="cx">         const HashTable* errorPrototypeTable;
</span><span class="cx">         const HashTable* globalObjectTable;
</span><span class="cx">         const HashTable* jsonTable;
</span><del>-        const HashTable* mathTable;
</del><span class="cx">         const HashTable* numberConstructorTable;
</span><span class="cx">         const HashTable* numberPrototypeTable;
</span><span class="cx">         const HashTable* objectConstructorTable;
</span></span></pre>
</div>
</div>

</body>
</html>