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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 801333002: [turbofan] Remove the no-context hack for JSToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve ARM Created 6 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
« no previous file with comments | « src/compiler/js-generic-lowering.h ('k') | src/ia32/code-stubs-ia32.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 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/graph-inl.h" 8 #include "src/compiler/graph-inl.h"
9 #include "src/compiler/js-generic-lowering.h" 9 #include "src/compiler/js-generic-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 void JSGenericLowering::LowerJSToBoolean(Node* node) { 226 void JSGenericLowering::LowerJSToBoolean(Node* node) {
227 Callable callable = 227 Callable callable =
228 CodeFactory::ToBoolean(isolate(), ToBooleanStub::RESULT_AS_ODDBALL); 228 CodeFactory::ToBoolean(isolate(), ToBooleanStub::RESULT_AS_ODDBALL);
229 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); 229 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
230 } 230 }
231 231
232 232
233 void JSGenericLowering::LowerJSToNumber(Node* node) { 233 void JSGenericLowering::LowerJSToNumber(Node* node) {
234 Callable callable = CodeFactory::ToNumber(isolate()); 234 Callable callable = CodeFactory::ToNumber(isolate());
235 // TODO(mstarzinger): Embedding the context this way prevents sharing of code
236 // across native contexts.
237 if (!info_context_constant_.is_set()) {
238 info_context_constant_.set(jsgraph()->HeapConstant(info()->context()));
239 }
240 node->ReplaceInput(1, info_context_constant_.get());
241 ReplaceWithStubCall(node, callable, FlagsForNode(node)); 235 ReplaceWithStubCall(node, callable, FlagsForNode(node));
242 } 236 }
243 237
244 238
245 void JSGenericLowering::LowerJSToString(Node* node) { 239 void JSGenericLowering::LowerJSToString(Node* node) {
246 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1); 240 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1);
247 } 241 }
248 242
249 243
250 void JSGenericLowering::LowerJSToObject(Node* node) { 244 void JSGenericLowering::LowerJSToObject(Node* node) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 419
426 420
427 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 421 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
428 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 422 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
429 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); 423 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity()));
430 } 424 }
431 425
432 } // namespace compiler 426 } // namespace compiler
433 } // namespace internal 427 } // namespace internal
434 } // namespace v8 428 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698