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

Side by Side Diff: test/cctest/test-alloc.cc

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-api.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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 TEST(StressJS) { 128 TEST(StressJS) {
129 v8::Persistent<v8::Context> env = v8::Context::New(); 129 v8::Persistent<v8::Context> env = v8::Context::New();
130 v8::HandleScope scope; 130 v8::HandleScope scope;
131 env->Enter(); 131 env->Enter();
132 Handle<JSFunction> function = 132 Handle<JSFunction> function =
133 FACTORY->NewFunction(FACTORY->function_symbol(), FACTORY->null_value()); 133 FACTORY->NewFunction(FACTORY->function_symbol(), FACTORY->null_value());
134 // Force the creation of an initial map and set the code to 134 // Force the creation of an initial map and set the code to
135 // something empty. 135 // something empty.
136 FACTORY->NewJSObject(function); 136 FACTORY->NewJSObject(function);
137 function->set_code(Isolate::Current()->builtins()->builtin( 137 function->ReplaceCode(Isolate::Current()->builtins()->builtin(
138 Builtins::EmptyFunction)); 138 Builtins::EmptyFunction));
139 // Patch the map to have an accessor for "get". 139 // Patch the map to have an accessor for "get".
140 Handle<Map> map(function->initial_map()); 140 Handle<Map> map(function->initial_map());
141 Handle<DescriptorArray> instance_descriptors(map->instance_descriptors()); 141 Handle<DescriptorArray> instance_descriptors(map->instance_descriptors());
142 Handle<Proxy> proxy = FACTORY->NewProxy(&kDescriptor); 142 Handle<Proxy> proxy = FACTORY->NewProxy(&kDescriptor);
143 instance_descriptors = FACTORY->CopyAppendProxyDescriptor( 143 instance_descriptors = FACTORY->CopyAppendProxyDescriptor(
144 instance_descriptors, 144 instance_descriptors,
145 FACTORY->NewStringFromAscii(Vector<const char>("get", 3)), 145 FACTORY->NewStringFromAscii(Vector<const char>("get", 3)),
146 proxy, 146 proxy,
147 static_cast<PropertyAttributes>(0)); 147 static_cast<PropertyAttributes>(0));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (index < blocks.length() - 1) { 212 if (index < blocks.length() - 1) {
213 blocks[index] = blocks.RemoveLast(); 213 blocks[index] = blocks.RemoveLast();
214 } else { 214 } else {
215 blocks.RemoveLast(); 215 blocks.RemoveLast();
216 } 216 }
217 } 217 }
218 } 218 }
219 219
220 Isolate::Current()->code_range()->TearDown(); 220 Isolate::Current()->code_range()->TearDown();
221 } 221 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698