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

Side by Side Diff: src/bootstrapper.cc

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Toon's comments Created 6 years, 1 month 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 | Annotate | Revision Log
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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 941
942 PropertyAttributes attribs = static_cast<PropertyAttributes>( 942 PropertyAttributes attribs = static_cast<PropertyAttributes>(
943 DONT_ENUM | DONT_DELETE); 943 DONT_ENUM | DONT_DELETE);
944 944
945 Handle<AccessorInfo> array_length = 945 Handle<AccessorInfo> array_length =
946 Accessors::ArrayLengthInfo(isolate, attribs); 946 Accessors::ArrayLengthInfo(isolate, attribs);
947 { // Add length. 947 { // Add length.
948 CallbacksDescriptor d( 948 CallbacksDescriptor d(
949 Handle<Name>(Name::cast(array_length->name())), 949 Handle<Name>(Name::cast(array_length->name())),
950 array_length, attribs); 950 array_length, attribs);
951 array_function->initial_map()->AppendDescriptor(&d); 951 initial_map->AppendDescriptor(&d);
952 } 952 }
953 953
954 // array_function is used internally. JS code creating array object should 954 // array_function is used internally. JS code creating array object should
955 // search for the 'Array' property on the global object and use that one 955 // search for the 'Array' property on the global object and use that one
956 // as the constructor. 'Array' property on a global object can be 956 // as the constructor. 'Array' property on a global object can be
957 // overwritten by JS code. 957 // overwritten by JS code.
958 native_context()->set_array_function(*array_function); 958 native_context()->set_array_function(*array_function);
959 959
960 // Cache the array maps, needed by ArrayConstructorStub 960 // Cache the array maps, needed by ArrayConstructorStub
961 CacheInitialJSArrayMaps(native_context(), initial_map); 961 CacheInitialJSArrayMaps(native_context(), initial_map);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 writable, 1081 writable,
1082 Representation::Tagged()); 1082 Representation::Tagged());
1083 initial_map->AppendDescriptor(&field); 1083 initial_map->AppendDescriptor(&field);
1084 } 1084 }
1085 1085
1086 initial_map->set_inobject_properties(5); 1086 initial_map->set_inobject_properties(5);
1087 initial_map->set_pre_allocated_property_fields(5); 1087 initial_map->set_pre_allocated_property_fields(5);
1088 initial_map->set_unused_property_fields(0); 1088 initial_map->set_unused_property_fields(0);
1089 initial_map->set_instance_size( 1089 initial_map->set_instance_size(
1090 initial_map->instance_size() + 5 * kPointerSize); 1090 initial_map->instance_size() + 5 * kPointerSize);
1091 initial_map->set_visitor_id(StaticVisitorBase::GetVisitorId(*initial_map));
1092 1091
1093 // RegExp prototype object is itself a RegExp. 1092 // RegExp prototype object is itself a RegExp.
1094 Handle<Map> proto_map = Map::Copy(initial_map); 1093 Handle<Map> proto_map = Map::Copy(initial_map);
1095 proto_map->set_prototype(native_context()->initial_object_prototype()); 1094 proto_map->set_prototype(native_context()->initial_object_prototype());
1096 Handle<JSObject> proto = factory->NewJSObjectFromMap(proto_map); 1095 Handle<JSObject> proto = factory->NewJSObjectFromMap(proto_map);
1097 proto->InObjectPropertyAtPut(JSRegExp::kSourceFieldIndex, 1096 proto->InObjectPropertyAtPut(JSRegExp::kSourceFieldIndex,
1098 heap->query_colon_string()); 1097 heap->query_colon_string());
1099 proto->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex, 1098 proto->InObjectPropertyAtPut(JSRegExp::kGlobalFieldIndex,
1100 heap->false_value()); 1099 heap->false_value());
1101 proto->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex, 1100 proto->InObjectPropertyAtPut(JSRegExp::kIgnoreCaseFieldIndex,
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 Map::EnsureDescriptorSlack(initial_map, 1); 1668 Map::EnsureDescriptorSlack(initial_map, 1);
1670 1669
1671 PropertyAttributes attribs = static_cast<PropertyAttributes>( 1670 PropertyAttributes attribs = static_cast<PropertyAttributes>(
1672 DONT_ENUM | DONT_DELETE); 1671 DONT_ENUM | DONT_DELETE);
1673 1672
1674 Handle<AccessorInfo> array_length = 1673 Handle<AccessorInfo> array_length =
1675 Accessors::ArrayLengthInfo(isolate(), attribs); 1674 Accessors::ArrayLengthInfo(isolate(), attribs);
1676 { // Add length. 1675 { // Add length.
1677 CallbacksDescriptor d( 1676 CallbacksDescriptor d(
1678 Handle<Name>(Name::cast(array_length->name())), array_length, attribs); 1677 Handle<Name>(Name::cast(array_length->name())), array_length, attribs);
1679 array_function->initial_map()->AppendDescriptor(&d); 1678 initial_map->AppendDescriptor(&d);
1680 } 1679 }
1681 1680
1682 return array_function; 1681 return array_function;
1683 } 1682 }
1684 1683
1685 1684
1686 bool Genesis::InstallNatives() { 1685 bool Genesis::InstallNatives() {
1687 HandleScope scope(isolate()); 1686 HandleScope scope(isolate());
1688 1687
1689 // Create a function for the builtins object. Allocate space for the 1688 // Create a function for the builtins object. Allocate space for the
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 return from + sizeof(NestingCounterType); 2815 return from + sizeof(NestingCounterType);
2817 } 2816 }
2818 2817
2819 2818
2820 // Called when the top-level V8 mutex is destroyed. 2819 // Called when the top-level V8 mutex is destroyed.
2821 void Bootstrapper::FreeThreadResources() { 2820 void Bootstrapper::FreeThreadResources() {
2822 DCHECK(!IsActive()); 2821 DCHECK(!IsActive());
2823 } 2822 }
2824 2823
2825 } } // namespace v8::internal 2824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698