Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/v8natives.js

Issue 1304633002: Correctify instanceof and make it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Add MIPS/MIPS64 ports. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 6
7 %CheckIsBootstrapping(); 7 %CheckIsBootstrapping();
8 8
9 // ---------------------------------------------------------------------------- 9 // ----------------------------------------------------------------------------
10 // Imports 10 // Imports
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 var handler = %GetHandler(object); 186 var handler = %GetHandler(object);
187 return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, name); 187 return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, name);
188 } 188 }
189 return %HasOwnProperty(object, name); 189 return %HasOwnProperty(object, name);
190 } 190 }
191 191
192 192
193 // ECMA-262 - 15.2.4.6 193 // ECMA-262 - 15.2.4.6
194 function ObjectIsPrototypeOf(V) { 194 function ObjectIsPrototypeOf(V) {
195 if (!IS_SPEC_OBJECT(V)) return false; 195 if (!IS_SPEC_OBJECT(V)) return false;
196 CHECK_OBJECT_COERCIBLE(this, "Object.prototype.isPrototypeOf"); 196 var O = TO_OBJECT(this);
197 return %IsInPrototypeChain(this, V); 197 return %_HasInPrototypeChain(V, O);
198 } 198 }
199 199
200 200
201 // ECMA-262 - 15.2.4.6 201 // ECMA-262 - 15.2.4.6
202 function ObjectPropertyIsEnumerable(V) { 202 function ObjectPropertyIsEnumerable(V) {
203 var P = $toName(V); 203 var P = $toName(V);
204 if (%_IsJSProxy(this)) { 204 if (%_IsJSProxy(this)) {
205 // TODO(rossberg): adjust once there is a story for symbols vs proxies. 205 // TODO(rossberg): adjust once there is a story for symbols vs proxies.
206 if (IS_SYMBOL(V)) return false; 206 if (IS_SYMBOL(V)) return false;
207 207
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 }); 1810 });
1811 1811
1812 utils.ExportToRuntime(function(to) { 1812 utils.ExportToRuntime(function(to) {
1813 to["global_eval_fun"] = GlobalEval; 1813 to["global_eval_fun"] = GlobalEval;
1814 to["object_define_own_property"] = DefineOwnPropertyFromAPI; 1814 to["object_define_own_property"] = DefineOwnPropertyFromAPI;
1815 to["object_get_own_property_descriptor"] = ObjectGetOwnPropertyDescriptor; 1815 to["object_get_own_property_descriptor"] = ObjectGetOwnPropertyDescriptor;
1816 to["to_complete_property_descriptor"] = ToCompletePropertyDescriptor; 1816 to["to_complete_property_descriptor"] = ToCompletePropertyDescriptor;
1817 }); 1817 });
1818 1818
1819 }) 1819 })
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698