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

Side by Side Diff: src/js/v8natives.js

Issue 1496503002: [runtime] [proxy] removing JSFunctionProxy and related code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: doh Created 5 years 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
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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 var name = %FunctionGetName(func); 1535 var name = %FunctionGetName(func);
1536 if (name) { 1536 if (name) {
1537 // Mimic what KJS does. 1537 // Mimic what KJS does.
1538 return 'function ' + name + '() { [native code] }'; 1538 return 'function ' + name + '() { [native code] }';
1539 } 1539 }
1540 1540
1541 return 'function () { [native code] }'; 1541 return 'function () { [native code] }';
1542 } 1542 }
1543 1543
1544 function FunctionSourceString(func) { 1544 function FunctionSourceString(func) {
1545 while (%IsJSFunctionProxy(func)) { 1545 //TODO(cbruni): resolve func to a non-proxy function for printing
Toon Verwaest 2015/12/03 11:48:42 The spec for Function.prototype.toString says only
Camillo Bruni 2015/12/03 12:18:26 removed.
1546 func = %GetCallTrap(func);
1547 }
1548 1546
1549 if (!IS_FUNCTION(func)) { 1547 if (!IS_FUNCTION(func)) {
1550 throw MakeTypeError(kNotGeneric, 'Function.prototype.toString'); 1548 throw MakeTypeError(kNotGeneric, 'Function.prototype.toString');
1551 } 1549 }
1552 1550
1553 if (%FunctionHidesSource(func)) { 1551 if (%FunctionHidesSource(func)) {
1554 return NativeCodeFunctionSourceString(func); 1552 return NativeCodeFunctionSourceString(func);
1555 } 1553 }
1556 1554
1557 var classSource = %ClassGetSourceCode(func); 1555 var classSource = %ClassGetSourceCode(func);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 1738
1741 %InstallToContext([ 1739 %InstallToContext([
1742 "global_eval_fun", GlobalEval, 1740 "global_eval_fun", GlobalEval,
1743 "object_value_of", ObjectValueOf, 1741 "object_value_of", ObjectValueOf,
1744 "object_to_string", ObjectToString, 1742 "object_to_string", ObjectToString,
1745 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, 1743 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor,
1746 "to_complete_property_descriptor", ToCompletePropertyDescriptor, 1744 "to_complete_property_descriptor", ToCompletePropertyDescriptor,
1747 ]); 1745 ]);
1748 1746
1749 }) 1747 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698