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

Side by Side Diff: src/ic/x87/handler-compiler-x87.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing wrongly wrapped lines Created 4 years, 6 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 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 break; 192 break;
193 case CallOptimization::kHolderNotFound: 193 case CallOptimization::kHolderNotFound:
194 UNREACHABLE(); 194 UNREACHABLE();
195 break; 195 break;
196 } 196 }
197 197
198 Isolate* isolate = masm->isolate(); 198 Isolate* isolate = masm->isolate();
199 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 199 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
200 bool call_data_undefined = false; 200 bool call_data_undefined = false;
201 // Put call data in place. 201 // Put call data in place.
202 if (api_call_info->data()->IsUndefined()) { 202 if (api_call_info->data()->IsUndefined(isolate)) {
203 call_data_undefined = true; 203 call_data_undefined = true;
204 __ mov(data, Immediate(isolate->factory()->undefined_value())); 204 __ mov(data, Immediate(isolate->factory()->undefined_value()));
205 } else { 205 } else {
206 if (optimization.is_constant_call()) { 206 if (optimization.is_constant_call()) {
207 __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 207 __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
208 __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 208 __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
209 __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 209 __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
210 } else { 210 } else {
211 __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); 211 __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
212 } 212 }
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 653 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
654 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, 654 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback,
655 LanguageMode language_mode) { 655 LanguageMode language_mode) {
656 Register holder_reg = Frontend(name); 656 Register holder_reg = Frontend(name);
657 657
658 __ pop(scratch1()); // remove the return address 658 __ pop(scratch1()); // remove the return address
659 __ push(receiver()); 659 __ push(receiver());
660 __ push(holder_reg); 660 __ push(holder_reg);
661 // If the callback cannot leak, then push the callback directly, 661 // If the callback cannot leak, then push the callback directly,
662 // otherwise wrap it in a weak cell. 662 // otherwise wrap it in a weak cell.
663 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { 663 if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) {
664 __ Push(callback); 664 __ Push(callback);
665 } else { 665 } else {
666 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); 666 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback);
667 __ Push(cell); 667 __ Push(cell);
668 } 668 }
669 __ Push(name); 669 __ Push(name);
670 __ push(value()); 670 __ push(value());
671 __ push(Immediate(Smi::FromInt(language_mode))); 671 __ push(Immediate(Smi::FromInt(language_mode)));
672 __ push(scratch1()); // restore return address 672 __ push(scratch1()); // restore return address
673 673
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 // Return the generated code. 719 // Return the generated code.
720 return GetCode(kind(), name); 720 return GetCode(kind(), name);
721 } 721 }
722 722
723 723
724 #undef __ 724 #undef __
725 } // namespace internal 725 } // namespace internal
726 } // namespace v8 726 } // namespace v8
727 727
728 #endif // V8_TARGET_ARCH_X87 728 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698