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

Side by Side Diff: src/heap.cc

Issue 181543002: Eliminate extended mode, and other modes clean-up (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/heap.h ('k') | src/hydrogen.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 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 4244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4255 } 4255 }
4256 4256
4257 4257
4258 MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) { 4258 MaybeObject* Heap::AllocateArgumentsObject(Object* callee, int length) {
4259 // To get fast allocation and map sharing for arguments objects we 4259 // To get fast allocation and map sharing for arguments objects we
4260 // allocate them based on an arguments boilerplate. 4260 // allocate them based on an arguments boilerplate.
4261 4261
4262 JSObject* boilerplate; 4262 JSObject* boilerplate;
4263 int arguments_object_size; 4263 int arguments_object_size;
4264 bool strict_mode_callee = callee->IsJSFunction() && 4264 bool strict_mode_callee = callee->IsJSFunction() &&
4265 !JSFunction::cast(callee)->shared()->is_sloppy_mode(); 4265 JSFunction::cast(callee)->shared()->strict_mode() == STRICT;
4266 if (strict_mode_callee) { 4266 if (strict_mode_callee) {
4267 boilerplate = 4267 boilerplate =
4268 isolate()->context()->native_context()-> 4268 isolate()->context()->native_context()->strict_arguments_boilerplate();
4269 strict_mode_arguments_boilerplate(); 4269 arguments_object_size = kStrictArgumentsObjectSize;
4270 arguments_object_size = kArgumentsObjectSizeStrict;
4271 } else { 4270 } else {
4272 boilerplate = 4271 boilerplate =
4273 isolate()->context()->native_context()->arguments_boilerplate(); 4272 isolate()->context()->native_context()->sloppy_arguments_boilerplate();
4274 arguments_object_size = kArgumentsObjectSize; 4273 arguments_object_size = kSloppyArgumentsObjectSize;
4275 } 4274 }
4276 4275
4277 // Check that the size of the boilerplate matches our 4276 // Check that the size of the boilerplate matches our
4278 // expectations. The ArgumentsAccessStub::GenerateNewObject relies 4277 // expectations. The ArgumentsAccessStub::GenerateNewObject relies
4279 // on the size being a known constant. 4278 // on the size being a known constant.
4280 ASSERT(arguments_object_size == boilerplate->map()->instance_size()); 4279 ASSERT(arguments_object_size == boilerplate->map()->instance_size());
4281 4280
4282 // Do the allocation. 4281 // Do the allocation.
4283 Object* result; 4282 Object* result;
4284 { MaybeObject* maybe_result = 4283 { MaybeObject* maybe_result =
(...skipping 3458 matching lines...) Expand 10 before | Expand all | Expand 10 after
7743 static_cast<int>(object_sizes_last_time_[index])); 7742 static_cast<int>(object_sizes_last_time_[index]));
7744 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7743 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7745 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7744 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7746 7745
7747 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7746 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7748 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7747 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7749 ClearObjectStats(); 7748 ClearObjectStats();
7750 } 7749 }
7751 7750
7752 } } // namespace v8::internal 7751 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698