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

Side by Side Diff: src/objects.cc

Issue 1293493004: Unify symbols sharing across native scripts and runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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/messages.js ('k') | src/prologue.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 7 #include <iomanip>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 133
134 bool Object::IsPromise(Handle<Object> object) { 134 bool Object::IsPromise(Handle<Object> object) {
135 if (!object->IsJSObject()) return false; 135 if (!object->IsJSObject()) return false;
136 auto js_object = Handle<JSObject>::cast(object); 136 auto js_object = Handle<JSObject>::cast(object);
137 // Promises can't have access checks. 137 // Promises can't have access checks.
138 if (js_object->map()->is_access_check_needed()) return false; 138 if (js_object->map()->is_access_check_needed()) return false;
139 auto isolate = js_object->GetIsolate(); 139 auto isolate = js_object->GetIsolate();
140 // TODO(dcarney): this should just be read from the symbol registry so as not 140 // TODO(dcarney): this should just be read from the symbol registry so as not
141 // to be context dependent. 141 // to be context dependent.
142 auto key = isolate->promise_status(); 142 auto key = isolate->factory()->promise_status_symbol();
143 // Shouldn't be possible to throw here. 143 // Shouldn't be possible to throw here.
144 return JSObject::HasRealNamedProperty(js_object, key).FromJust(); 144 return JSObject::HasRealNamedProperty(js_object, key).FromJust();
145 } 145 }
146 146
147 147
148 MaybeHandle<Object> Object::GetProperty(LookupIterator* it, 148 MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
149 LanguageMode language_mode) { 149 LanguageMode language_mode) {
150 for (; it->IsFound(); it->Next()) { 150 for (; it->IsFound(); it->Next()) {
151 switch (it->state()) { 151 switch (it->state()) {
152 case LookupIterator::NOT_FOUND: 152 case LookupIterator::NOT_FOUND:
(...skipping 15515 matching lines...) Expand 10 before | Expand all | Expand 10 after
15668 if (cell->value() != *new_value) { 15668 if (cell->value() != *new_value) {
15669 cell->set_value(*new_value); 15669 cell->set_value(*new_value);
15670 Isolate* isolate = cell->GetIsolate(); 15670 Isolate* isolate = cell->GetIsolate();
15671 cell->dependent_code()->DeoptimizeDependentCodeGroup( 15671 cell->dependent_code()->DeoptimizeDependentCodeGroup(
15672 isolate, DependentCode::kPropertyCellChangedGroup); 15672 isolate, DependentCode::kPropertyCellChangedGroup);
15673 } 15673 }
15674 } 15674 }
15675 15675
15676 } // namespace internal 15676 } // namespace internal
15677 } // namespace v8 15677 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698