| OLD | NEW | 
|     1 // Copyright 2011 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 | 
|    11 //       with the distribution. |    11 //       with the distribution. | 
| (...skipping 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4675                                   Vector< Handle<Object> > arguments) { |  4675                                   Vector< Handle<Object> > arguments) { | 
|  4676   int argc = arguments.length(); |  4676   int argc = arguments.length(); | 
|  4677   Handle<FixedArray> elements = isolate()->factory()->NewFixedArray(argc, |  4677   Handle<FixedArray> elements = isolate()->factory()->NewFixedArray(argc, | 
|  4678                                                                     TENURED); |  4678                                                                     TENURED); | 
|  4679   for (int i = 0; i < argc; i++) { |  4679   for (int i = 0; i < argc; i++) { | 
|  4680     Handle<Object> element = arguments[i]; |  4680     Handle<Object> element = arguments[i]; | 
|  4681     if (!element.is_null()) { |  4681     if (!element.is_null()) { | 
|  4682       elements->set(i, *element); |  4682       elements->set(i, *element); | 
|  4683     } |  4683     } | 
|  4684   } |  4684   } | 
|  4685   Handle<JSArray> array = isolate()->factory()->NewJSArrayWithElements(elements, |  4685   Handle<JSArray> array = isolate()->factory()->NewJSArrayWithElements( | 
|  4686                                                                        TENURED); |  4686       elements, FAST_ELEMENTS, TENURED); | 
|  4687  |  4687  | 
|  4688   ZoneList<Expression*>* args = new(zone()) ZoneList<Expression*>(2); |  4688   ZoneList<Expression*>* args = new(zone()) ZoneList<Expression*>(2); | 
|  4689   args->Add(NewLiteral(type)); |  4689   args->Add(NewLiteral(type)); | 
|  4690   args->Add(NewLiteral(array)); |  4690   args->Add(NewLiteral(array)); | 
|  4691   CallRuntime* call_constructor = new(zone()) CallRuntime(isolate(), |  4691   CallRuntime* call_constructor = new(zone()) CallRuntime(isolate(), | 
|  4692                                                           constructor, |  4692                                                           constructor, | 
|  4693                                                           NULL, |  4693                                                           NULL, | 
|  4694                                                           args); |  4694                                                           args); | 
|  4695   return new(zone()) Throw(isolate(), |  4695   return new(zone()) Throw(isolate(), | 
|  4696                            call_constructor, |  4696                            call_constructor, | 
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5689       ASSERT(info->isolate()->has_pending_exception()); |  5689       ASSERT(info->isolate()->has_pending_exception()); | 
|  5690     } else { |  5690     } else { | 
|  5691       result = parser.ParseProgram(info); |  5691       result = parser.ParseProgram(info); | 
|  5692     } |  5692     } | 
|  5693   } |  5693   } | 
|  5694   info->SetFunction(result); |  5694   info->SetFunction(result); | 
|  5695   return (result != NULL); |  5695   return (result != NULL); | 
|  5696 } |  5696 } | 
|  5697  |  5697  | 
|  5698 } }  // namespace v8::internal |  5698 } }  // namespace v8::internal | 
| OLD | NEW |