| OLD | NEW |
| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 607 |
| 608 | 608 |
| 609 RUNTIME_FUNCTION(StorePropertyWithInterceptor) { | 609 RUNTIME_FUNCTION(StorePropertyWithInterceptor) { |
| 610 HandleScope scope(isolate); | 610 HandleScope scope(isolate); |
| 611 DCHECK(args.length() == 3); | 611 DCHECK(args.length() == 3); |
| 612 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); | 612 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); |
| 613 Handle<JSObject> receiver = args.at<JSObject>(0); | 613 Handle<JSObject> receiver = args.at<JSObject>(0); |
| 614 Handle<Name> name = args.at<Name>(1); | 614 Handle<Name> name = args.at<Name>(1); |
| 615 Handle<Object> value = args.at<Object>(2); | 615 Handle<Object> value = args.at<Object>(2); |
| 616 #ifdef DEBUG | 616 #ifdef DEBUG |
| 617 if (receiver->IsJSGlobalProxy()) { | 617 PrototypeIterator iter(isolate, receiver, |
| 618 PrototypeIterator iter(isolate, receiver); | 618 PrototypeIterator::START_AT_RECEIVER); |
| 619 DCHECK(iter.IsAtEnd() || | 619 bool found = false; |
| 620 Handle<JSGlobalObject>::cast(PrototypeIterator::GetCurrent(iter)) | 620 while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { |
| 621 ->HasNamedInterceptor()); | 621 Handle<Object> current = PrototypeIterator::GetCurrent(iter); |
| 622 } else { | 622 if (current->IsJSObject() && |
| 623 DCHECK(receiver->HasNamedInterceptor()); | 623 Handle<JSObject>::cast(current)->HasNamedInterceptor()) { |
| 624 found = true; |
| 625 break; |
| 626 } |
| 624 } | 627 } |
| 628 DCHECK(found); |
| 625 #endif | 629 #endif |
| 626 Handle<Object> result; | 630 Handle<Object> result; |
| 627 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 631 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 628 isolate, result, | 632 isolate, result, |
| 629 JSObject::SetProperty(receiver, name, value, ic.strict_mode())); | 633 JSObject::SetProperty(receiver, name, value, ic.strict_mode())); |
| 630 return *result; | 634 return *result; |
| 631 } | 635 } |
| 632 | 636 |
| 633 | 637 |
| 634 RUNTIME_FUNCTION(LoadElementWithInterceptor) { | 638 RUNTIME_FUNCTION(LoadElementWithInterceptor) { |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 | 1004 |
| 1001 GenerateRestoreName(&miss, name); | 1005 GenerateRestoreName(&miss, name); |
| 1002 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1006 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1003 | 1007 |
| 1004 GenerateRestoreName(&slow, name); | 1008 GenerateRestoreName(&slow, name); |
| 1005 TailCallBuiltin(masm(), SlowBuiltin(kind())); | 1009 TailCallBuiltin(masm(), SlowBuiltin(kind())); |
| 1006 return GetCode(kind(), Code::FAST, name); | 1010 return GetCode(kind(), Code::FAST, name); |
| 1007 } | 1011 } |
| 1008 | 1012 |
| 1009 | 1013 |
| 1010 Handle<Code> NamedStoreHandlerCompiler::CompileStoreField(LookupResult* lookup, | 1014 Handle<Code> NamedStoreHandlerCompiler::CompileStoreField( |
| 1011 Handle<Name> name) { | 1015 LookupIterator* lookup, Handle<Name> name) { |
| 1012 Label miss; | 1016 Label miss; |
| 1013 GenerateStoreField(lookup, value(), &miss); | 1017 GenerateStoreField(lookup, value(), &miss); |
| 1014 __ bind(&miss); | 1018 __ bind(&miss); |
| 1015 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1019 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1016 return GetCode(kind(), Code::FAST, name); | 1020 return GetCode(kind(), Code::FAST, name); |
| 1017 } | 1021 } |
| 1018 | 1022 |
| 1019 | 1023 |
| 1020 Handle<Code> NamedStoreHandlerCompiler::CompileStoreViaSetter( | 1024 Handle<Code> NamedStoreHandlerCompiler::CompileStoreViaSetter( |
| 1021 Handle<JSObject> object, Handle<Name> name, Handle<JSFunction> setter) { | 1025 Handle<JSObject> object, Handle<Name> name, Handle<JSFunction> setter) { |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 Handle<FunctionTemplateInfo>( | 1291 Handle<FunctionTemplateInfo>( |
| 1288 FunctionTemplateInfo::cast(signature->receiver())); | 1292 FunctionTemplateInfo::cast(signature->receiver())); |
| 1289 } | 1293 } |
| 1290 } | 1294 } |
| 1291 | 1295 |
| 1292 is_simple_api_call_ = true; | 1296 is_simple_api_call_ = true; |
| 1293 } | 1297 } |
| 1294 | 1298 |
| 1295 | 1299 |
| 1296 } } // namespace v8::internal | 1300 } } // namespace v8::internal |
| OLD | NEW |