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

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

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removing Handle suffix and renaming enum entries 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
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 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3210 } 3210 }
3211 3211
3212 3212
3213 void SharedFunctionInfo::set_deopt_counter(Smi* value) { 3213 void SharedFunctionInfo::set_deopt_counter(Smi* value) {
3214 WRITE_FIELD(this, kDeoptCounterOffset, value); 3214 WRITE_FIELD(this, kDeoptCounterOffset, value);
3215 } 3215 }
3216 3216
3217 3217
3218 bool SharedFunctionInfo::is_compiled() { 3218 bool SharedFunctionInfo::is_compiled() {
3219 return code() != 3219 return code() !=
3220 Isolate::Current()->builtins()->builtin(Builtins::LazyCompile); 3220 Isolate::Current()->builtins()->builtin(Builtins::kLazyCompile);
3221 } 3221 }
3222 3222
3223 3223
3224 bool SharedFunctionInfo::IsApiFunction() { 3224 bool SharedFunctionInfo::IsApiFunction() {
3225 return function_data()->IsFunctionTemplateInfo(); 3225 return function_data()->IsFunctionTemplateInfo();
3226 } 3226 }
3227 3227
3228 3228
3229 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { 3229 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
3230 ASSERT(IsApiFunction()); 3230 ASSERT(IsApiFunction());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 SharedFunctionInfo::kDontAdaptArgumentsSentinel; 3270 SharedFunctionInfo::kDontAdaptArgumentsSentinel;
3271 } 3271 }
3272 3272
3273 3273
3274 bool JSFunction::IsOptimized() { 3274 bool JSFunction::IsOptimized() {
3275 return code()->kind() == Code::OPTIMIZED_FUNCTION; 3275 return code()->kind() == Code::OPTIMIZED_FUNCTION;
3276 } 3276 }
3277 3277
3278 3278
3279 bool JSFunction::IsMarkedForLazyRecompilation() { 3279 bool JSFunction::IsMarkedForLazyRecompilation() {
3280 return code() == GetIsolate()->builtins()->builtin(Builtins::LazyRecompile); 3280 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile);
3281 } 3281 }
3282 3282
3283 3283
3284 Code* JSFunction::code() { 3284 Code* JSFunction::code() {
3285 return Code::cast(unchecked_code()); 3285 return Code::cast(unchecked_code());
3286 } 3286 }
3287 3287
3288 3288
3289 Code* JSFunction::unchecked_code() { 3289 Code* JSFunction::unchecked_code() {
3290 return reinterpret_cast<Code*>( 3290 return reinterpret_cast<Code*>(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 if (map()->has_non_instance_prototype()) return map()->constructor(); 3384 if (map()->has_non_instance_prototype()) return map()->constructor();
3385 return instance_prototype(); 3385 return instance_prototype();
3386 } 3386 }
3387 3387
3388 bool JSFunction::should_have_prototype() { 3388 bool JSFunction::should_have_prototype() {
3389 return map()->function_with_prototype(); 3389 return map()->function_with_prototype();
3390 } 3390 }
3391 3391
3392 3392
3393 bool JSFunction::is_compiled() { 3393 bool JSFunction::is_compiled() {
3394 return code() != GetIsolate()->builtins()->builtin(Builtins::LazyCompile); 3394 return code() != GetIsolate()->builtins()->builtin(Builtins::kLazyCompile);
3395 } 3395 }
3396 3396
3397 3397
3398 int JSFunction::NumberOfLiterals() { 3398 int JSFunction::NumberOfLiterals() {
3399 return literals()->length(); 3399 return literals()->length();
3400 } 3400 }
3401 3401
3402 3402
3403 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { 3403 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) {
3404 ASSERT(id < kJSBuiltinsCount); // id is unsigned. 3404 ASSERT(id < kJSBuiltinsCount); // id is unsigned.
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
4110 #undef WRITE_INT_FIELD 4110 #undef WRITE_INT_FIELD
4111 #undef READ_SHORT_FIELD 4111 #undef READ_SHORT_FIELD
4112 #undef WRITE_SHORT_FIELD 4112 #undef WRITE_SHORT_FIELD
4113 #undef READ_BYTE_FIELD 4113 #undef READ_BYTE_FIELD
4114 #undef WRITE_BYTE_FIELD 4114 #undef WRITE_BYTE_FIELD
4115 4115
4116 4116
4117 } } // namespace v8::internal 4117 } } // namespace v8::internal
4118 4118
4119 #endif // V8_OBJECTS_INL_H_ 4119 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/builtins.cc ('K') | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698