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

Side by Side Diff: src/objects.h

Issue 246743003: Dictionary::New() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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.cc ('k') | src/objects.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 4039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4050 // Accessors for next enumeration index. 4050 // Accessors for next enumeration index.
4051 void SetNextEnumerationIndex(int index) { 4051 void SetNextEnumerationIndex(int index) {
4052 ASSERT(index != 0); 4052 ASSERT(index != 0);
4053 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); 4053 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index));
4054 } 4054 }
4055 4055
4056 int NextEnumerationIndex() { 4056 int NextEnumerationIndex() {
4057 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value(); 4057 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value();
4058 } 4058 }
4059 4059
4060 // Returns a new array for dictionary usage. Might return Failure.
4061 MUST_USE_RESULT static MaybeObject* Allocate(
4062 Heap* heap,
4063 int at_least_space_for,
4064 PretenureFlag pretenure = NOT_TENURED);
4065
4066 // Creates a new dictionary. 4060 // Creates a new dictionary.
4067 MUST_USE_RESULT static Handle<Derived> New( 4061 MUST_USE_RESULT static Handle<Derived> New(
4068 Isolate* isolate, 4062 Isolate* isolate,
4069 int at_least_space_for, 4063 int at_least_space_for,
4070 PretenureFlag pretenure = NOT_TENURED); 4064 PretenureFlag pretenure = NOT_TENURED);
4071 4065
4072 // Ensure enough space for n additional elements. 4066 // Ensure enough space for n additional elements.
4073 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key); 4067 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key);
4074 4068
4075 #ifdef OBJECT_PRINT 4069 #ifdef OBJECT_PRINT
(...skipping 7209 matching lines...) Expand 10 before | Expand all | Expand 10 after
11285 } else { 11279 } else {
11286 value &= ~(1 << bit_position); 11280 value &= ~(1 << bit_position);
11287 } 11281 }
11288 return value; 11282 return value;
11289 } 11283 }
11290 }; 11284 };
11291 11285
11292 } } // namespace v8::internal 11286 } } // namespace v8::internal
11293 11287
11294 #endif // V8_OBJECTS_H_ 11288 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698