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

Side by Side Diff: src/bootstrapper.cc

Issue 232933003: Revert r20652 "Handlify and convert string.length to new API-style accessor." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/accessors.cc ('k') | src/serialize.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 "bootstrapper.h" 5 #include "bootstrapper.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "natives.h" 9 #include "natives.h"
10 #include "snapshot.h" 10 #include "snapshot.h"
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 string_fun->shared()->set_construct_stub( 913 string_fun->shared()->set_construct_stub(
914 isolate->builtins()->builtin(Builtins::kStringConstructCode)); 914 isolate->builtins()->builtin(Builtins::kStringConstructCode));
915 native_context()->set_string_function(*string_fun); 915 native_context()->set_string_function(*string_fun);
916 916
917 Handle<Map> string_map = 917 Handle<Map> string_map =
918 Handle<Map>(native_context()->string_function()->initial_map()); 918 Handle<Map>(native_context()->string_function()->initial_map());
919 Handle<DescriptorArray> string_descriptors( 919 Handle<DescriptorArray> string_descriptors(
920 factory->NewDescriptorArray(0, 1)); 920 factory->NewDescriptorArray(0, 1));
921 DescriptorArray::WhitenessWitness witness(*string_descriptors); 921 DescriptorArray::WhitenessWitness witness(*string_descriptors);
922 922
923 Handle<Foreign> string_length(
924 factory->NewForeign(&Accessors::StringLength));
923 PropertyAttributes attribs = static_cast<PropertyAttributes>( 925 PropertyAttributes attribs = static_cast<PropertyAttributes>(
924 DONT_ENUM | DONT_DELETE | READ_ONLY); 926 DONT_ENUM | DONT_DELETE | READ_ONLY);
925 Handle<AccessorInfo> string_length(
926 Accessors::StringLengthInfo(isolate, attribs));
927 string_map->set_instance_descriptors(*string_descriptors); 927 string_map->set_instance_descriptors(*string_descriptors);
928 928
929 { // Add length. 929 { // Add length.
930 CallbacksDescriptor d(factory->length_string(), string_length, attribs); 930 CallbacksDescriptor d(factory->length_string(), string_length, attribs);
931 string_map->AppendDescriptor(&d, witness); 931 string_map->AppendDescriptor(&d, witness);
932 } 932 }
933 } 933 }
934 934
935 { // --- D a t e --- 935 { // --- D a t e ---
936 // Builtin functions for Date.prototype. 936 // Builtin functions for Date.prototype.
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 return from + sizeof(NestingCounterType); 2718 return from + sizeof(NestingCounterType);
2719 } 2719 }
2720 2720
2721 2721
2722 // Called when the top-level V8 mutex is destroyed. 2722 // Called when the top-level V8 mutex is destroyed.
2723 void Bootstrapper::FreeThreadResources() { 2723 void Bootstrapper::FreeThreadResources() {
2724 ASSERT(!IsActive()); 2724 ASSERT(!IsActive());
2725 } 2725 }
2726 2726
2727 } } // namespace v8::internal 2727 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698