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

Side by Side Diff: src/factory.cc

Issue 210063004: Callers of ElementsAccessor::SetCapacityAndLength() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/factory.h ('k') | src/json-stringifier.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 int capacity, 1479 int capacity,
1480 ArrayStorageAllocationMode mode) { 1480 ArrayStorageAllocationMode mode) {
1481 CALL_HEAP_FUNCTION_VOID(isolate(), 1481 CALL_HEAP_FUNCTION_VOID(isolate(),
1482 isolate()->heap()->AllocateJSArrayStorage(*array, 1482 isolate()->heap()->AllocateJSArrayStorage(*array,
1483 length, 1483 length,
1484 capacity, 1484 capacity,
1485 mode)); 1485 mode));
1486 } 1486 }
1487 1487
1488 1488
1489 void Factory::SetElementsCapacityAndLength(Handle<JSArray> array,
1490 int capacity,
1491 int length) {
1492 ElementsAccessor* accessor = array->GetElementsAccessor();
1493 CALL_HEAP_FUNCTION_VOID(
1494 isolate(),
1495 accessor->SetCapacityAndLength(*array, capacity, length));
1496 }
1497
1498
1499 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject( 1489 Handle<JSGeneratorObject> Factory::NewJSGeneratorObject(
1500 Handle<JSFunction> function) { 1490 Handle<JSFunction> function) {
1501 ASSERT(function->shared()->is_generator()); 1491 ASSERT(function->shared()->is_generator());
1502 JSFunction::EnsureHasInitialMap(function); 1492 JSFunction::EnsureHasInitialMap(function);
1503 Handle<Map> map(function->initial_map()); 1493 Handle<Map> map(function->initial_map());
1504 ASSERT(map->instance_type() == JS_GENERATOR_OBJECT_TYPE); 1494 ASSERT(map->instance_type() == JS_GENERATOR_OBJECT_TYPE);
1505 CALL_HEAP_FUNCTION( 1495 CALL_HEAP_FUNCTION(
1506 isolate(), 1496 isolate(),
1507 isolate()->heap()->AllocateJSObjectFromMap(*map), 1497 isolate()->heap()->AllocateJSObjectFromMap(*map),
1508 JSGeneratorObject); 1498 JSGeneratorObject);
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 return Handle<Object>::null(); 2024 return Handle<Object>::null();
2035 } 2025 }
2036 2026
2037 2027
2038 Handle<Object> Factory::ToBoolean(bool value) { 2028 Handle<Object> Factory::ToBoolean(bool value) {
2039 return value ? true_value() : false_value(); 2029 return value ? true_value() : false_value();
2040 } 2030 }
2041 2031
2042 2032
2043 } } // namespace v8::internal 2033 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698