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

Side by Side Diff: src/runtime/runtime-regexp.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/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arguments.h" 7 #include "src/arguments.h"
8 #include "src/jsregexp-inl.h" 8 #include "src/jsregexp-inl.h"
9 #include "src/jsregexp.h" 9 #include "src/jsregexp.h"
10 #include "src/runtime/runtime-utils.h" 10 #include "src/runtime/runtime-utils.h"
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 isolate, NewSyntaxError("invalid_regexp_flags", args)); 859 isolate, NewSyntaxError("invalid_regexp_flags", args));
860 } 860 }
861 861
862 Handle<Object> global = factory->ToBoolean(flags.is_global()); 862 Handle<Object> global = factory->ToBoolean(flags.is_global());
863 Handle<Object> ignore_case = factory->ToBoolean(flags.is_ignore_case()); 863 Handle<Object> ignore_case = factory->ToBoolean(flags.is_ignore_case());
864 Handle<Object> multiline = factory->ToBoolean(flags.is_multiline()); 864 Handle<Object> multiline = factory->ToBoolean(flags.is_multiline());
865 Handle<Object> sticky = factory->ToBoolean(flags.is_sticky()); 865 Handle<Object> sticky = factory->ToBoolean(flags.is_sticky());
866 Handle<Object> unicode = factory->ToBoolean(flags.is_unicode()); 866 Handle<Object> unicode = factory->ToBoolean(flags.is_unicode());
867 867
868 Map* map = regexp->map(); 868 Map* map = regexp->map();
869 Object* constructor = map->constructor(); 869 Object* constructor = map->GetConstructor();
870 if (!FLAG_harmony_regexps && !FLAG_harmony_unicode_regexps && 870 if (!FLAG_harmony_regexps && !FLAG_harmony_unicode_regexps &&
871 constructor->IsJSFunction() && 871 constructor->IsJSFunction() &&
872 JSFunction::cast(constructor)->initial_map() == map) { 872 JSFunction::cast(constructor)->initial_map() == map) {
873 // If we still have the original map, set in-object properties directly. 873 // If we still have the original map, set in-object properties directly.
874 // Both true and false are immovable immortal objects so no need for write 874 // Both true and false are immovable immortal objects so no need for write
875 // barrier. 875 // barrier.
876 regexp->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex, *global, 876 regexp->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex, *global,
877 SKIP_WRITE_BARRIER); 877 SKIP_WRITE_BARRIER);
878 regexp->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex, *ignore_case, 878 regexp->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex, *ignore_case,
879 SKIP_WRITE_BARRIER); 879 SKIP_WRITE_BARRIER);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 1123
1124 1124
1125 RUNTIME_FUNCTION(RuntimeReference_IsRegExp) { 1125 RUNTIME_FUNCTION(RuntimeReference_IsRegExp) {
1126 SealHandleScope shs(isolate); 1126 SealHandleScope shs(isolate);
1127 DCHECK(args.length() == 1); 1127 DCHECK(args.length() == 1);
1128 CONVERT_ARG_CHECKED(Object, obj, 0); 1128 CONVERT_ARG_CHECKED(Object, obj, 0);
1129 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); 1129 return isolate->heap()->ToBoolean(obj->IsJSRegExp());
1130 } 1130 }
1131 } 1131 }
1132 } // namespace v8::internal 1132 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698