Rewrites a ternary choice operator to fix a compiler

linkage bug.

Review URL: http://codereview.chromium.org/8189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2008-10-27 12:24:22 +00:00
parent 6941a4f389
commit 724f5648b9
2 changed files with 5 additions and 4 deletions

View File

@ -6789,6 +6789,4 @@ int BreakPointInfo::GetBreakPointCount() {
}
const int FunctionTemplateInfo::kSize;
const int ObjectTemplateInfo::kSize;
} } // namespace v8::internal

View File

@ -327,8 +327,11 @@ static Object* Runtime_GetTemplateField(Arguments args) {
RUNTIME_ASSERT(type == FUNCTION_TEMPLATE_INFO_TYPE ||
type == OBJECT_TEMPLATE_INFO_TYPE);
RUNTIME_ASSERT(offset > 0);
RUNTIME_ASSERT(offset < ((type == FUNCTION_TEMPLATE_INFO_TYPE) ?
FunctionTemplateInfo::kSize : ObjectTemplateInfo::kSize));
if (type == FUNCTION_TEMPLATE_INFO_TYPE) {
RUNTIME_ASSERT(offset < FunctionTemplateInfo::kSize);
} else {
RUNTIME_ASSERT(offset < ObjectTemplateInfo::kSize);
}
return HeapObject::RawField(templ, offset);
}