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

Side by Side Diff: src/objects.cc

Issue 1903093003: Reland of Change calling convention of CallApiGetterStub to accept the AccessorInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 } 1084 }
1085 } else if (getter->IsCallable()) { 1085 } else if (getter->IsCallable()) {
1086 // TODO(rossberg): nicer would be to cast to some JSCallable here... 1086 // TODO(rossberg): nicer would be to cast to some JSCallable here...
1087 return Object::GetPropertyWithDefinedGetter( 1087 return Object::GetPropertyWithDefinedGetter(
1088 receiver, Handle<JSReceiver>::cast(getter)); 1088 receiver, Handle<JSReceiver>::cast(getter));
1089 } 1089 }
1090 // Getter is not a function. 1090 // Getter is not a function.
1091 return ReadAbsentProperty(isolate, receiver, it->GetName()); 1091 return ReadAbsentProperty(isolate, receiver, it->GetName());
1092 } 1092 }
1093 1093
1094 #ifdef USE_SIMULATOR
1095 // static
1096 Address AccessorInfo::redirect(Isolate* isolate, Address address,
1097 AccessorComponent component) {
1098 ApiFunction fun(address);
1099 DCHECK_EQ(ACCESSOR_GETTER, component);
1100 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL;
1101 return ExternalReference(&fun, type, isolate).address();
1102 }
1103
1104 Address AccessorInfo::redirected_getter() const {
1105 Address accessor = v8::ToCData<Address>(getter());
1106 if (accessor == nullptr) return nullptr;
1107 return redirect(GetIsolate(), accessor, ACCESSOR_GETTER);
1108 }
1109 #endif
1094 1110
1095 bool AccessorInfo::IsCompatibleReceiverMap(Isolate* isolate, 1111 bool AccessorInfo::IsCompatibleReceiverMap(Isolate* isolate,
1096 Handle<AccessorInfo> info, 1112 Handle<AccessorInfo> info,
1097 Handle<Map> map) { 1113 Handle<Map> map) {
1098 if (!info->HasExpectedReceiverType()) return true; 1114 if (!info->HasExpectedReceiverType()) return true;
1099 if (!map->IsJSObjectMap()) return false; 1115 if (!map->IsJSObjectMap()) return false;
1100 return FunctionTemplateInfo::cast(info->expected_receiver_type()) 1116 return FunctionTemplateInfo::cast(info->expected_receiver_type())
1101 ->IsTemplateFor(*map); 1117 ->IsTemplateFor(*map);
1102 } 1118 }
1103 1119
(...skipping 18292 matching lines...) Expand 10 before | Expand all | Expand 10 after
19396 if (cell->value() != *new_value) { 19412 if (cell->value() != *new_value) {
19397 cell->set_value(*new_value); 19413 cell->set_value(*new_value);
19398 Isolate* isolate = cell->GetIsolate(); 19414 Isolate* isolate = cell->GetIsolate();
19399 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19415 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19400 isolate, DependentCode::kPropertyCellChangedGroup); 19416 isolate, DependentCode::kPropertyCellChangedGroup);
19401 } 19417 }
19402 } 19418 }
19403 19419
19404 } // namespace internal 19420 } // namespace internal
19405 } // namespace v8 19421 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698