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

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

Issue 5753005: Make closures optimizable by Crankshaft compiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor fix in hash function Created 10 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
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 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 return Code::cast(READ_FIELD(this, kCodeOffset)); 2978 return Code::cast(READ_FIELD(this, kCodeOffset));
2979 } 2979 }
2980 2980
2981 2981
2982 Code* SharedFunctionInfo::unchecked_code() { 2982 Code* SharedFunctionInfo::unchecked_code() {
2983 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); 2983 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset));
2984 } 2984 }
2985 2985
2986 2986
2987 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { 2987 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
2988 // If optimization has been disabled for the shared function info,
2989 // reflect that in the code object so it will not be counted as
2990 // optimizable code.
2991 ASSERT(value->kind() != Code::FUNCTION ||
2992 !value->optimizable() ||
2993 this->code() == Builtins::builtin(Builtins::Illegal) ||
2994 this->allows_lazy_compilation());
2995 WRITE_FIELD(this, kCodeOffset, value); 2988 WRITE_FIELD(this, kCodeOffset, value);
2996 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); 2989 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode);
2997 } 2990 }
2998 2991
2999 2992
3000 SerializedScopeInfo* SharedFunctionInfo::scope_info() { 2993 SerializedScopeInfo* SharedFunctionInfo::scope_info() {
3001 return reinterpret_cast<SerializedScopeInfo*>( 2994 return reinterpret_cast<SerializedScopeInfo*>(
3002 READ_FIELD(this, kScopeInfoOffset)); 2995 READ_FIELD(this, kScopeInfoOffset));
3003 } 2996 }
3004 2997
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 #undef WRITE_INT_FIELD 3838 #undef WRITE_INT_FIELD
3846 #undef READ_SHORT_FIELD 3839 #undef READ_SHORT_FIELD
3847 #undef WRITE_SHORT_FIELD 3840 #undef WRITE_SHORT_FIELD
3848 #undef READ_BYTE_FIELD 3841 #undef READ_BYTE_FIELD
3849 #undef WRITE_BYTE_FIELD 3842 #undef WRITE_BYTE_FIELD
3850 3843
3851 3844
3852 } } // namespace v8::internal 3845 } } // namespace v8::internal
3853 3846
3854 #endif // V8_OBJECTS_INL_H_ 3847 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698