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

Side by Side Diff: src/bootstrapper.cc

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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/arm/stub-cache-arm.cc ('k') | src/builtins.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 1085
1086 result->LocalLookup(heap->length_symbol(), &lookup); 1086 result->LocalLookup(heap->length_symbol(), &lookup);
1087 ASSERT(lookup.IsFound() && (lookup.type() == FIELD)); 1087 ASSERT(lookup.IsFound() && (lookup.type() == FIELD));
1088 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex); 1088 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex);
1089 1089
1090 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); 1090 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex);
1091 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1091 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1092 1092
1093 // Check the state of the object. 1093 // Check the state of the object.
1094 ASSERT(result->HasFastProperties()); 1094 ASSERT(result->HasFastProperties());
1095 ASSERT(result->HasFastObjectElements()); 1095 ASSERT(result->HasFastElements());
1096 #endif 1096 #endif
1097 } 1097 }
1098 1098
1099 { // --- aliased_arguments_boilerplate_ 1099 { // --- aliased_arguments_boilerplate_
1100 // Set up a well-formed parameter map to make assertions happy. 1100 // Set up a well-formed parameter map to make assertions happy.
1101 Handle<FixedArray> elements = factory->NewFixedArray(2); 1101 Handle<FixedArray> elements = factory->NewFixedArray(2);
1102 elements->set_map(heap->non_strict_arguments_elements_map()); 1102 elements->set_map(heap->non_strict_arguments_elements_map());
1103 Handle<FixedArray> array; 1103 Handle<FixedArray> array;
1104 array = factory->NewFixedArray(0); 1104 array = factory->NewFixedArray(0);
1105 elements->set(0, *array); 1105 elements->set(0, *array);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 #ifdef DEBUG 1178 #ifdef DEBUG
1179 LookupResult lookup(isolate); 1179 LookupResult lookup(isolate);
1180 result->LocalLookup(heap->length_symbol(), &lookup); 1180 result->LocalLookup(heap->length_symbol(), &lookup);
1181 ASSERT(lookup.IsFound() && (lookup.type() == FIELD)); 1181 ASSERT(lookup.IsFound() && (lookup.type() == FIELD));
1182 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex); 1182 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex);
1183 1183
1184 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1184 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1185 1185
1186 // Check the state of the object. 1186 // Check the state of the object.
1187 ASSERT(result->HasFastProperties()); 1187 ASSERT(result->HasFastProperties());
1188 ASSERT(result->HasFastObjectElements()); 1188 ASSERT(result->HasFastElements());
1189 #endif 1189 #endif
1190 } 1190 }
1191 1191
1192 { // --- context extension 1192 { // --- context extension
1193 // Create a function for the context extension objects. 1193 // Create a function for the context extension objects.
1194 Handle<Code> code = Handle<Code>( 1194 Handle<Code> code = Handle<Code>(
1195 isolate->builtins()->builtin(Builtins::kIllegal)); 1195 isolate->builtins()->builtin(Builtins::kIllegal));
1196 Handle<JSFunction> context_extension_fun = 1196 Handle<JSFunction> context_extension_fun =
1197 factory->NewFunction(factory->empty_symbol(), 1197 factory->NewFunction(factory->empty_symbol(),
1198 JS_CONTEXT_EXTENSION_OBJECT_TYPE, 1198 JS_CONTEXT_EXTENSION_OBJECT_TYPE,
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 1628
1629 // InternalArrays should not use Smi-Only array optimizations. There are too 1629 // InternalArrays should not use Smi-Only array optimizations. There are too
1630 // many places in the C++ runtime code (e.g. RegEx) that assume that 1630 // many places in the C++ runtime code (e.g. RegEx) that assume that
1631 // elements in InternalArrays can be set to non-Smi values without going 1631 // elements in InternalArrays can be set to non-Smi values without going
1632 // through a common bottleneck that would make the SMI_ONLY -> FAST_ELEMENT 1632 // through a common bottleneck that would make the SMI_ONLY -> FAST_ELEMENT
1633 // transition easy to trap. Moreover, they rarely are smi-only. 1633 // transition easy to trap. Moreover, they rarely are smi-only.
1634 MaybeObject* maybe_map = 1634 MaybeObject* maybe_map =
1635 array_function->initial_map()->CopyDropTransitions(); 1635 array_function->initial_map()->CopyDropTransitions();
1636 Map* new_map; 1636 Map* new_map;
1637 if (!maybe_map->To<Map>(&new_map)) return false; 1637 if (!maybe_map->To<Map>(&new_map)) return false;
1638 new_map->set_elements_kind(FAST_HOLEY_ELEMENTS); 1638 new_map->set_elements_kind(FAST_ELEMENTS);
1639 array_function->set_initial_map(new_map); 1639 array_function->set_initial_map(new_map);
1640 1640
1641 // Make "length" magic on instances. 1641 // Make "length" magic on instances.
1642 Handle<DescriptorArray> array_descriptors = 1642 Handle<DescriptorArray> array_descriptors =
1643 factory()->CopyAppendForeignDescriptor( 1643 factory()->CopyAppendForeignDescriptor(
1644 factory()->empty_descriptor_array(), 1644 factory()->empty_descriptor_array(),
1645 factory()->length_symbol(), 1645 factory()->length_symbol(),
1646 factory()->NewForeign(&Accessors::ArrayLength), 1646 factory()->NewForeign(&Accessors::ArrayLength),
1647 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE)); 1647 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE));
1648 1648
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 return from + sizeof(NestingCounterType); 2366 return from + sizeof(NestingCounterType);
2367 } 2367 }
2368 2368
2369 2369
2370 // Called when the top-level V8 mutex is destroyed. 2370 // Called when the top-level V8 mutex is destroyed.
2371 void Bootstrapper::FreeThreadResources() { 2371 void Bootstrapper::FreeThreadResources() {
2372 ASSERT(!IsActive()); 2372 ASSERT(!IsActive());
2373 } 2373 }
2374 2374
2375 } } // namespace v8::internal 2375 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698