Code* JavaScriptFrame::unchecked_code() const {
JSFunction* function = JSFunction::cast(this->function());
- return function->unchecked_code();
+ return function->code();
}
SetInternalReference(js_fun, entry,
"shared", shared_info,
JSFunction::kSharedFunctionInfoOffset);
- TagObject(js_fun->unchecked_context(), "(context)");
+ TagObject(js_fun->context(), "(context)");
SetInternalReference(js_fun, entry,
- "context", js_fun->unchecked_context(),
+ "context", js_fun->context(),
JSFunction::kContextOffset);
for (int i = JSFunction::kNonWeakFieldsEndOffset;
i < JSFunction::kSize;
InstanceType type = map->instance_type();
if ((type & kShortcutTypeMask) != kShortcutTypeTag) return object;
- Object* second = reinterpret_cast<ConsString*>(object)->unchecked_second();
+ Object* second = reinterpret_cast<ConsString*>(object)->second();
Heap* heap = map->GetHeap();
if (second != heap->empty_string()) {
return object;
// Since we don't have the object's start, it is impossible to update the
// page dirty marks. Therefore, we only replace the string with its left
// substring when page dirty marks do not change.
- Object* first = reinterpret_cast<ConsString*>(object)->unchecked_first();
+ Object* first = reinterpret_cast<ConsString*>(object)->first();
if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object;
*p = first;
Code* JSFunction::code() {
- return Code::cast(unchecked_code());
-}
-
-
-Code* JSFunction::unchecked_code() {
- return reinterpret_cast<Code*>(
+ return Code::cast(
Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset)));
}
}
-Object* JSFunction::unchecked_context() {
- return READ_FIELD(this, kContextOffset);
-}
-
-
void JSFunction::set_context(Object* value) {
ASSERT(value->IsUndefined() || value->IsContext());
WRITE_FIELD(this, kContextOffset, value);
PrintF(out, "\n - name = ");
shared()->name()->Print(out);
PrintF(out, "\n - context = ");
- unchecked_context()->ShortPrint(out);
+ context()->ShortPrint(out);
PrintF(out, "\n - literals = ");
literals()->ShortPrint(out);
PrintF(out, "\n - code = ");
}
// The function must have a valid context and not be a builtin.
- if (!IsValidNonBuiltinContext(function->unchecked_context())) {
+ if (!IsValidNonBuiltinContext(function->context())) {
return false;
}
// [context]: The context for this function.
inline Context* context();
- inline Object* unchecked_context();
inline void set_context(Object* context);
// [code]: The generated code object for this function. Executed
inline void set_code_no_write_barrier(Code* code);
inline void ReplaceCode(Code* code);
- inline Code* unchecked_code();
-
// Tells whether this function is builtin.
inline bool IsBuiltin();
}
JSFunction* fun = JSFunction::cast(f);
- Object* perhaps_context = fun->unchecked_context();
+ Object* perhaps_context = fun->context();
if (perhaps_context->IsHeapObject() &&
heap->Contains(HeapObject::cast(perhaps_context)) &&
perhaps_context->IsContext()) {