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

Side by Side Diff: src/isolate.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 years, 10 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/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('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 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 Handle<JSArray> stack_trace = factory()->NewJSArray(frame_limit); 604 Handle<JSArray> stack_trace = factory()->NewJSArray(frame_limit);
605 for (int i = 1; i < elements_limit && frames_seen < frame_limit; i += 4) { 605 for (int i = 1; i < elements_limit && frames_seen < frame_limit; i += 4) {
606 Handle<Object> recv = handle(elements->get(i), this); 606 Handle<Object> recv = handle(elements->get(i), this);
607 Handle<JSFunction> fun = 607 Handle<JSFunction> fun =
608 handle(JSFunction::cast(elements->get(i + 1)), this); 608 handle(JSFunction::cast(elements->get(i + 1)), this);
609 Handle<Code> code = handle(Code::cast(elements->get(i + 2)), this); 609 Handle<Code> code = handle(Code::cast(elements->get(i + 2)), this);
610 Handle<Smi> offset = handle(Smi::cast(elements->get(i + 3)), this); 610 Handle<Smi> offset = handle(Smi::cast(elements->get(i + 3)), this);
611 Address pc = code->address() + offset->value(); 611 Address pc = code->address() + offset->value();
612 bool is_constructor = 612 bool is_constructor =
613 recv->IsJSObject() && 613 recv->IsJSObject() &&
614 Handle<JSObject>::cast(recv)->map()->constructor() == *fun; 614 Handle<JSObject>::cast(recv)->map()->GetConstructor() == *fun;
615 615
616 Handle<JSObject> stack_frame = 616 Handle<JSObject> stack_frame =
617 helper.NewStackFrameObject(fun, code, pc, is_constructor); 617 helper.NewStackFrameObject(fun, code, pc, is_constructor);
618 618
619 FixedArray::cast(stack_trace->elements())->set(frames_seen, *stack_frame); 619 FixedArray::cast(stack_trace->elements())->set(frames_seen, *stack_frame);
620 frames_seen++; 620 frames_seen++;
621 } 621 }
622 622
623 stack_trace->set_length(Smi::FromInt(frames_seen)); 623 stack_trace->set_length(Smi::FromInt(frames_seen));
624 return stack_trace; 624 return stack_trace;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 718
719 void Isolate::SetFailedAccessCheckCallback( 719 void Isolate::SetFailedAccessCheckCallback(
720 v8::FailedAccessCheckCallback callback) { 720 v8::FailedAccessCheckCallback callback) {
721 thread_local_top()->failed_access_check_callback_ = callback; 721 thread_local_top()->failed_access_check_callback_ = callback;
722 } 722 }
723 723
724 724
725 static inline AccessCheckInfo* GetAccessCheckInfo(Isolate* isolate, 725 static inline AccessCheckInfo* GetAccessCheckInfo(Isolate* isolate,
726 Handle<JSObject> receiver) { 726 Handle<JSObject> receiver) {
727 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); 727 JSFunction* constructor = JSFunction::cast(receiver->map()->GetConstructor());
728 if (!constructor->shared()->IsApiFunction()) return NULL; 728 if (!constructor->shared()->IsApiFunction()) return NULL;
729 729
730 Object* data_obj = 730 Object* data_obj =
731 constructor->shared()->get_api_func_data()->access_check_info(); 731 constructor->shared()->get_api_func_data()->access_check_info();
732 if (data_obj == isolate->heap()->undefined_value()) return NULL; 732 if (data_obj == isolate->heap()->undefined_value()) return NULL;
733 733
734 return AccessCheckInfo::cast(data_obj); 734 return AccessCheckInfo::cast(data_obj);
735 } 735 }
736 736
737 737
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 1162
1163 Handle<String> error_key = 1163 Handle<String> error_key =
1164 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("$Error")); 1164 factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("$Error"));
1165 Handle<Object> error_constructor = Object::GetProperty( 1165 Handle<Object> error_constructor = Object::GetProperty(
1166 js_builtins_object(), error_key).ToHandleChecked(); 1166 js_builtins_object(), error_key).ToHandleChecked();
1167 1167
1168 DisallowHeapAllocation no_gc; 1168 DisallowHeapAllocation no_gc;
1169 for (PrototypeIterator iter(this, *obj, PrototypeIterator::START_AT_RECEIVER); 1169 for (PrototypeIterator iter(this, *obj, PrototypeIterator::START_AT_RECEIVER);
1170 !iter.IsAtEnd(); iter.Advance()) { 1170 !iter.IsAtEnd(); iter.Advance()) {
1171 if (iter.GetCurrent()->IsJSProxy()) return false; 1171 if (iter.GetCurrent()->IsJSProxy()) return false;
1172 if (JSObject::cast(iter.GetCurrent())->map()->constructor() == 1172 if (JSObject::cast(iter.GetCurrent())->map()->GetConstructor() ==
1173 *error_constructor) { 1173 *error_constructor) {
1174 return true; 1174 return true;
1175 } 1175 }
1176 } 1176 }
1177 return false; 1177 return false;
1178 } 1178 }
1179 1179
1180 static int fatal_exception_depth = 0; 1180 static int fatal_exception_depth = 0;
1181 1181
1182 1182
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2607 if (prev_ && prev_->Intercept(flag)) return true; 2607 if (prev_ && prev_->Intercept(flag)) return true;
2608 // Then check whether this scope intercepts. 2608 // Then check whether this scope intercepts.
2609 if ((flag & intercept_mask_)) { 2609 if ((flag & intercept_mask_)) {
2610 intercepted_flags_ |= flag; 2610 intercepted_flags_ |= flag;
2611 return true; 2611 return true;
2612 } 2612 }
2613 return false; 2613 return false;
2614 } 2614 }
2615 2615
2616 } } // namespace v8::internal 2616 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698