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

Side by Side Diff: src/bootstrapper.cc

Issue 7187007: Merge arguments branch to bleeding edge (second try). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Undelete external-array test. Created 9 years, 6 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/ast.h ('k') | src/builtins.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1048
1049 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); 1049 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex);
1050 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1050 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1051 1051
1052 // Check the state of the object. 1052 // Check the state of the object.
1053 ASSERT(result->HasFastProperties()); 1053 ASSERT(result->HasFastProperties());
1054 ASSERT(result->HasFastElements()); 1054 ASSERT(result->HasFastElements());
1055 #endif 1055 #endif
1056 } 1056 }
1057 1057
1058 { // --- aliased_arguments_boilerplate_
1059 Handle<Map> old_map(global_context()->arguments_boilerplate()->map());
1060 Handle<Map> new_map = factory->CopyMapDropTransitions(old_map);
1061 new_map->set_pre_allocated_property_fields(2);
1062 Handle<JSObject> result = factory->NewJSObjectFromMap(new_map);
1063 new_map->set_elements_kind(JSObject::NON_STRICT_ARGUMENTS_ELEMENTS);
1064 // Set up a well-formed parameter map to make assertions happy.
1065 Handle<FixedArray> elements = factory->NewFixedArray(2);
1066 elements->set_map(heap->non_strict_arguments_elements_map());
1067 Handle<FixedArray> array;
1068 array = factory->NewFixedArray(0);
1069 elements->set(0, *array);
1070 array = factory->NewFixedArray(0);
1071 elements->set(1, *array);
1072 result->set_elements(*elements);
1073 global_context()->set_aliased_arguments_boilerplate(*result);
1074 }
1075
1058 { // --- strict mode arguments boilerplate 1076 { // --- strict mode arguments boilerplate
1059 const PropertyAttributes attributes = 1077 const PropertyAttributes attributes =
1060 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY); 1078 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
1061 1079
1062 // Create the ThrowTypeError functions. 1080 // Create the ThrowTypeError functions.
1063 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED); 1081 Handle<FixedArray> callee = factory->NewFixedArray(2, TENURED);
1064 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED); 1082 Handle<FixedArray> caller = factory->NewFixedArray(2, TENURED);
1065 1083
1066 Handle<JSFunction> throw_function = 1084 Handle<JSFunction> throw_function =
1067 GetThrowTypeErrorFunction(); 1085 GetThrowTypeErrorFunction();
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 return from + sizeof(NestingCounterType); 2198 return from + sizeof(NestingCounterType);
2181 } 2199 }
2182 2200
2183 2201
2184 // Called when the top-level V8 mutex is destroyed. 2202 // Called when the top-level V8 mutex is destroyed.
2185 void Bootstrapper::FreeThreadResources() { 2203 void Bootstrapper::FreeThreadResources() {
2186 ASSERT(!IsActive()); 2204 ASSERT(!IsActive());
2187 } 2205 }
2188 2206
2189 } } // namespace v8::internal 2207 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698