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

Side by Side Diff: src/code-factory.cc

Issue 1417503008: [turbofan] Use CompareNilIC for abstract equality with null/undefined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/code-factory.h" 5 #include "src/code-factory.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // static 124 // static
125 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op, 125 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op,
126 Strength strength) { 126 Strength strength) {
127 Handle<Code> code = CompareIC::GetUninitialized(isolate, op, strength); 127 Handle<Code> code = CompareIC::GetUninitialized(isolate, op, strength);
128 return Callable(code, CompareDescriptor(isolate)); 128 return Callable(code, CompareDescriptor(isolate));
129 } 129 }
130 130
131 131
132 // static 132 // static
133 Callable CodeFactory::CompareNilIC(Isolate* isolate, NilValue nil_value) {
134 Handle<Code> code = CompareNilICStub::GetUninitialized(isolate, nil_value);
135 return Callable(code, CompareNilDescriptor(isolate));
136 }
137
138
139 // static
133 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op, 140 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op,
134 Strength strength) { 141 Strength strength) {
135 BinaryOpICStub stub(isolate, op, strength); 142 BinaryOpICStub stub(isolate, op, strength);
136 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 143 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
137 } 144 }
138 145
139 146
140 // static 147 // static
141 Callable CodeFactory::InstanceOf(Isolate* isolate) { 148 Callable CodeFactory::InstanceOf(Isolate* isolate) {
142 InstanceOfStub stub(isolate); 149 InstanceOfStub stub(isolate);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { 306 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) {
300 // TODO(rmcilroy): Deal with runtime functions that return two values. 307 // TODO(rmcilroy): Deal with runtime functions that return two values.
301 // Note: If we ever use fpregs in the interpreter then we will need to 308 // Note: If we ever use fpregs in the interpreter then we will need to
302 // save fpregs too. 309 // save fpregs too.
303 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); 310 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister);
304 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); 311 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate));
305 } 312 }
306 313
307 } // namespace internal 314 } // namespace internal
308 } // namespace v8 315 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698