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

Side by Side Diff: src/bootstrapper.cc

Issue 14576005: Adapt hydrogen-based Array constructor to also support InternalArray and function call (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adapt to bugfix for 244461 Created 7 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/arm/code-stubs-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 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 name, 1599 name,
1600 JS_ARRAY_TYPE, 1600 JS_ARRAY_TYPE,
1601 JSArray::kSize, 1601 JSArray::kSize,
1602 isolate()->initial_object_prototype(), 1602 isolate()->initial_object_prototype(),
1603 Builtins::kInternalArrayCode, 1603 Builtins::kInternalArrayCode,
1604 true, true); 1604 true, true);
1605 Handle<JSObject> prototype = 1605 Handle<JSObject> prototype =
1606 factory()->NewJSObject(isolate()->object_function(), TENURED); 1606 factory()->NewJSObject(isolate()->object_function(), TENURED);
1607 SetPrototype(array_function, prototype); 1607 SetPrototype(array_function, prototype);
1608 1608
1609 array_function->shared()->set_construct_stub( 1609 if (FLAG_optimize_constructed_arrays) {
1610 isolate()->builtins()->builtin(Builtins::kCommonArrayConstructCode)); 1610 InternalArrayConstructorStub internal_array_constructor_stub(isolate());
1611 Handle<Code> code = internal_array_constructor_stub.GetCode(isolate());
1612 array_function->shared()->set_construct_stub(*code);
1613 } else {
1614 array_function->shared()->set_construct_stub(
1615 isolate()->builtins()->builtin(Builtins::kCommonArrayConstructCode));
1616 }
1611 1617
1612 array_function->shared()->DontAdaptArguments(); 1618 array_function->shared()->DontAdaptArguments();
1613 1619
1614 Handle<Map> original_map(array_function->initial_map()); 1620 Handle<Map> original_map(array_function->initial_map());
1615 Handle<Map> initial_map = factory()->CopyMap(original_map); 1621 Handle<Map> initial_map = factory()->CopyMap(original_map);
1616 initial_map->set_elements_kind(elements_kind); 1622 initial_map->set_elements_kind(elements_kind);
1617 array_function->set_initial_map(*initial_map); 1623 array_function->set_initial_map(*initial_map);
1618 1624
1619 // Make "length" magic on instances. 1625 // Make "length" magic on instances.
1620 Handle<DescriptorArray> array_descriptors( 1626 Handle<DescriptorArray> array_descriptors(
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 return from + sizeof(NestingCounterType); 2633 return from + sizeof(NestingCounterType);
2628 } 2634 }
2629 2635
2630 2636
2631 // Called when the top-level V8 mutex is destroyed. 2637 // Called when the top-level V8 mutex is destroyed.
2632 void Bootstrapper::FreeThreadResources() { 2638 void Bootstrapper::FreeThreadResources() {
2633 ASSERT(!IsActive()); 2639 ASSERT(!IsActive());
2634 } 2640 }
2635 2641
2636 } } // namespace v8::internal 2642 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698