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

Side by Side Diff: src/objects-inl.h

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with latest Created 8 years 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/objects.cc ('k') | src/optimizing-compiler-thread.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 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after
3218 3218
3219 3219
3220 int Code::arguments_count() { 3220 int Code::arguments_count() {
3221 ASSERT(is_call_stub() || is_keyed_call_stub() || kind() == STUB); 3221 ASSERT(is_call_stub() || is_keyed_call_stub() || kind() == STUB);
3222 return ExtractArgumentsCountFromFlags(flags()); 3222 return ExtractArgumentsCountFromFlags(flags());
3223 } 3223 }
3224 3224
3225 3225
3226 int Code::major_key() { 3226 int Code::major_key() {
3227 ASSERT(kind() == STUB || 3227 ASSERT(kind() == STUB ||
3228 kind() == COMPILED_STUB ||
3228 kind() == UNARY_OP_IC || 3229 kind() == UNARY_OP_IC ||
3229 kind() == BINARY_OP_IC || 3230 kind() == BINARY_OP_IC ||
3230 kind() == COMPARE_IC || 3231 kind() == COMPARE_IC ||
3231 kind() == TO_BOOLEAN_IC); 3232 kind() == TO_BOOLEAN_IC);
3232 return StubMajorKeyField::decode( 3233 return StubMajorKeyField::decode(
3233 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3234 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3234 } 3235 }
3235 3236
3236 3237
3237 void Code::set_major_key(int major) { 3238 void Code::set_major_key(int major) {
3238 ASSERT(kind() == STUB || 3239 ASSERT(kind() == STUB ||
3240 kind() == COMPILED_STUB ||
3239 kind() == UNARY_OP_IC || 3241 kind() == UNARY_OP_IC ||
3240 kind() == BINARY_OP_IC || 3242 kind() == BINARY_OP_IC ||
3241 kind() == COMPARE_IC || 3243 kind() == COMPARE_IC ||
3242 kind() == TO_BOOLEAN_IC); 3244 kind() == TO_BOOLEAN_IC);
3243 ASSERT(0 <= major && major < 256); 3245 ASSERT(0 <= major && major < 256);
3244 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3246 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3245 int updated = StubMajorKeyField::update(previous, major); 3247 int updated = StubMajorKeyField::update(previous, major);
3246 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3248 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3247 } 3249 }
3248 3250
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
3337 3339
3338 3340
3339 void Code::set_profiler_ticks(int ticks) { 3341 void Code::set_profiler_ticks(int ticks) {
3340 ASSERT_EQ(FUNCTION, kind()); 3342 ASSERT_EQ(FUNCTION, kind());
3341 ASSERT(ticks < 256); 3343 ASSERT(ticks < 256);
3342 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks); 3344 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks);
3343 } 3345 }
3344 3346
3345 3347
3346 unsigned Code::stack_slots() { 3348 unsigned Code::stack_slots() {
3347 ASSERT(kind() == OPTIMIZED_FUNCTION); 3349 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB);
3348 return StackSlotsField::decode( 3350 return StackSlotsField::decode(
3349 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 3351 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
3350 } 3352 }
3351 3353
3352 3354
3353 void Code::set_stack_slots(unsigned slots) { 3355 void Code::set_stack_slots(unsigned slots) {
3354 CHECK(slots <= (1 << kStackSlotsBitCount)); 3356 CHECK(slots <= (1 << kStackSlotsBitCount));
3355 ASSERT(kind() == OPTIMIZED_FUNCTION); 3357 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB);
3356 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); 3358 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
3357 int updated = StackSlotsField::update(previous, slots); 3359 int updated = StackSlotsField::update(previous, slots);
3358 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); 3360 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
3359 } 3361 }
3360 3362
3361 3363
3362 unsigned Code::safepoint_table_offset() { 3364 unsigned Code::safepoint_table_offset() {
3363 ASSERT(kind() == OPTIMIZED_FUNCTION); 3365 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB);
3364 return SafepointTableOffsetField::decode( 3366 return SafepointTableOffsetField::decode(
3365 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3367 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3366 } 3368 }
3367 3369
3368 3370
3369 void Code::set_safepoint_table_offset(unsigned offset) { 3371 void Code::set_safepoint_table_offset(unsigned offset) {
3370 CHECK(offset <= (1 << kSafepointTableOffsetBitCount)); 3372 CHECK(offset <= (1 << kSafepointTableOffsetBitCount));
3371 ASSERT(kind() == OPTIMIZED_FUNCTION); 3373 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB);
3372 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize))); 3374 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize)));
3373 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3375 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3374 int updated = SafepointTableOffsetField::update(previous, offset); 3376 int updated = SafepointTableOffsetField::update(previous, offset);
3375 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3377 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3376 } 3378 }
3377 3379
3378 3380
3379 unsigned Code::stack_check_table_offset() { 3381 unsigned Code::stack_check_table_offset() {
3380 ASSERT_EQ(FUNCTION, kind()); 3382 ASSERT_EQ(FUNCTION, kind());
3381 return StackCheckTableOffsetField::decode( 3383 return StackCheckTableOffsetField::decode(
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
5546 #undef WRITE_UINT32_FIELD 5548 #undef WRITE_UINT32_FIELD
5547 #undef READ_SHORT_FIELD 5549 #undef READ_SHORT_FIELD
5548 #undef WRITE_SHORT_FIELD 5550 #undef WRITE_SHORT_FIELD
5549 #undef READ_BYTE_FIELD 5551 #undef READ_BYTE_FIELD
5550 #undef WRITE_BYTE_FIELD 5552 #undef WRITE_BYTE_FIELD
5551 5553
5552 5554
5553 } } // namespace v8::internal 5555 } } // namespace v8::internal
5554 5556
5555 #endif // V8_OBJECTS_INL_H_ 5557 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698