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

Side by Side Diff: src/heap.h

Issue 6698015: Implement strict mode arguments caller/callee. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Kevin's feedback. Created 9 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/contexts.h ('k') | src/heap.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // Allocates a function initialized with a shared part. 576 // Allocates a function initialized with a shared part.
577 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 577 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
578 // failed. 578 // failed.
579 // Please note this does not perform a garbage collection. 579 // Please note this does not perform a garbage collection.
580 MUST_USE_RESULT static MaybeObject* AllocateFunction( 580 MUST_USE_RESULT static MaybeObject* AllocateFunction(
581 Map* function_map, 581 Map* function_map,
582 SharedFunctionInfo* shared, 582 SharedFunctionInfo* shared,
583 Object* prototype, 583 Object* prototype,
584 PretenureFlag pretenure = TENURED); 584 PretenureFlag pretenure = TENURED);
585 585
586 // Indicies for direct access into argument objects. 586 // Arguments object size.
587 static const int kArgumentsObjectSize = 587 static const int kArgumentsObjectSize =
588 JSObject::kHeaderSize + 2 * kPointerSize; 588 JSObject::kHeaderSize + 2 * kPointerSize;
589 static const int arguments_callee_index = 0; 589 // Strict mode arguments has no callee so it is smaller.
590 static const int arguments_length_index = 1; 590 static const int kArgumentsObjectSizeStrict =
591 JSObject::kHeaderSize + 1 * kPointerSize;
592 // Indicies for direct access into argument objects.
593 static const int kArgumentsLengthIndex = 0;
594 // callee is only valid in non-strict mode.
595 static const int kArgumentsCalleeIndex = 1;
591 596
592 // Allocates an arguments object - optionally with an elements array. 597 // Allocates an arguments object - optionally with an elements array.
593 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 598 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
594 // failed. 599 // failed.
595 // Please note this does not perform a garbage collection. 600 // Please note this does not perform a garbage collection.
596 MUST_USE_RESULT static MaybeObject* AllocateArgumentsObject(Object* callee, 601 MUST_USE_RESULT static MaybeObject* AllocateArgumentsObject(Object* callee,
597 int length); 602 int length);
598 603
599 // Same as NewNumberFromDouble, but may return a preallocated/immutable 604 // Same as NewNumberFromDouble, but may return a preallocated/immutable
600 // number object (e.g., minus_zero_value_, nan_value_) 605 // number object (e.g., minus_zero_value_, nan_value_)
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 AssertNoAllocation no_alloc; // i.e. no gc allowed. 2216 AssertNoAllocation no_alloc; // i.e. no gc allowed.
2212 2217
2213 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2218 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2214 }; 2219 };
2215 #endif // DEBUG || LIVE_OBJECT_LIST 2220 #endif // DEBUG || LIVE_OBJECT_LIST
2216 2221
2217 2222
2218 } } // namespace v8::internal 2223 } } // namespace v8::internal
2219 2224
2220 #endif // V8_HEAP_H_ 2225 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698