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

Side by Side Diff: src/bootstrapper.cc

Issue 6824081: Add a stub for allocating parameter maps. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/arguments/
Patch Set: '' Created 9 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 | « no previous file | src/code-stubs.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1037
1038 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); 1038 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex);
1039 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1039 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1040 1040
1041 // Check the state of the object. 1041 // Check the state of the object.
1042 ASSERT(result->HasFastProperties()); 1042 ASSERT(result->HasFastProperties());
1043 ASSERT(result->HasFastElements()); 1043 ASSERT(result->HasFastElements());
1044 #endif 1044 #endif
1045 } 1045 }
1046 1046
1047 { // --- aliased_arguments_boilerplate_
1048 Handle<Map> old_map(global_context()->arguments_boilerplate()->map());
1049 Handle<Map> new_map = factory->CopyMapDropTransitions(old_map);
1050 new_map->set_pre_allocated_property_fields(2);
1051 Handle<JSObject> result = factory->NewJSObjectFromMap(new_map);
1052 new_map->set_has_fast_elements(false);
1053 // Set up a well-formed parameter map to make assertions happy.
1054 Handle<FixedArray> elements = factory->NewFixedArray(2);
1055 elements->set_map(heap->non_strict_arguments_elements_map());
1056 elements->set(0, *factory->NewFixedArray(0));
1057 elements->set(1, *factory->NewFixedArray(0));
1058 result->set_elements(*elements);
1059 global_context()->set_aliased_arguments_boilerplate(*result);
1060 }
1061
1047 { // --- strict mode arguments boilerplate 1062 { // --- strict mode arguments boilerplate
1048 const PropertyAttributes attributes = 1063 const PropertyAttributes attributes =
1049 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); 1064 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
1050 1065
1051 // Create the ThrowTypeError functions. 1066 // Create the ThrowTypeError functions.
1052 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED); 1067 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED);
1053 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED); 1068 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED);
1054 1069
1055 Handle<JSFunction> callee_throw = 1070 Handle<JSFunction> callee_throw =
1056 CreateThrowTypeErrorFunction(Builtins::kStrictArgumentsCallee); 1071 CreateThrowTypeErrorFunction(Builtins::kStrictArgumentsCallee);
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 return from + sizeof(NestingCounterType); 2144 return from + sizeof(NestingCounterType);
2130 } 2145 }
2131 2146
2132 2147
2133 // Called when the top-level V8 mutex is destroyed. 2148 // Called when the top-level V8 mutex is destroyed.
2134 void Bootstrapper::FreeThreadResources() { 2149 void Bootstrapper::FreeThreadResources() {
2135 ASSERT(!IsActive()); 2150 ASSERT(!IsActive());
2136 } 2151 }
2137 2152
2138 } } // namespace v8::internal 2153 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698