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

Side by Side Diff: src/runtime/runtime-object.cc

Issue 1309883002: Get rid of CompilationInfo::GenerateCodeStub method. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 // ignored anyway, we use the global object as the receiver 1103 // ignored anyway, we use the global object as the receiver
1104 // instead of a new JSFunction object. This way, errors are 1104 // instead of a new JSFunction object. This way, errors are
1105 // reported the same way whether or not 'Function' is called 1105 // reported the same way whether or not 'Function' is called
1106 // using 'new'. 1106 // using 'new'.
1107 return isolate->global_proxy(); 1107 return isolate->global_proxy();
1108 } 1108 }
1109 } 1109 }
1110 1110
1111 // The function should be compiled for the optimization hints to be 1111 // The function should be compiled for the optimization hints to be
1112 // available. 1112 // available.
1113 Compiler::EnsureCompiled(function, CLEAR_EXCEPTION); 1113 Compiler::Compile(function, CLEAR_EXCEPTION);
1114 1114
1115 Handle<JSObject> result; 1115 Handle<JSObject> result;
1116 if (site.is_null()) { 1116 if (site.is_null()) {
1117 result = isolate->factory()->NewJSObject(function); 1117 result = isolate->factory()->NewJSObject(function);
1118 } else { 1118 } else {
1119 result = isolate->factory()->NewJSObjectWithMemento(function, site); 1119 result = isolate->factory()->NewJSObjectWithMemento(function, site);
1120 } 1120 }
1121 1121
1122 // Set up the prototoype using original function. 1122 // Set up the prototoype using original function.
1123 // TODO(dslomov): instead of setting the __proto__, 1123 // TODO(dslomov): instead of setting the __proto__,
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 SealHandleScope scope(isolate); 1463 SealHandleScope scope(isolate);
1464 DCHECK_EQ(2, args.length()); 1464 DCHECK_EQ(2, args.length());
1465 CONVERT_ARG_CHECKED(Object, x, 0); 1465 CONVERT_ARG_CHECKED(Object, x, 0);
1466 CONVERT_ARG_CHECKED(Object, y, 1); 1466 CONVERT_ARG_CHECKED(Object, y, 1);
1467 // TODO(bmeurer): Change this at some point to return true/false instead. 1467 // TODO(bmeurer): Change this at some point to return true/false instead.
1468 return Smi::FromInt(x->StrictEquals(y) ? EQUAL : NOT_EQUAL); 1468 return Smi::FromInt(x->StrictEquals(y) ? EQUAL : NOT_EQUAL);
1469 } 1469 }
1470 1470
1471 } // namespace internal 1471 } // namespace internal
1472 } // namespace v8 1472 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698